Hello,
I have a text file which contains a list of strings which I want to grep from another file where these strings occur and print out only these lines.
I had earlier used the grep command
Quote:
grep -f File1 File2
where File1 was the file containing the strings to be grepped (Source File) and File2 the Target File from which the strings ha
I recently had trouble with some regex on the command-line, and
found that for matching a backslash, different numbers of
characters can be used. This number depends on the quoting used for
the regex (none, single quotes, double quotes).
Hi all
I am working on disallowing users to use easy passwords in pam.d setting on RHEL 5.7 and SuSe 11, and I was hoping to add more words into the current cracklib dict, so I use "echo" command to append new words into the file
I dont want to add the same words into the dict, I think I have too many redundant words now.
hello
does someone want to help me for this one ?
Hello,
I have a very large dictionary file which is in text format and which contains a large number of sub-sections.
I had a command which would work through a text file, count all the occurrences of the words and print it out like this:
remy@box $˜ magic-command-i-forgot | with grep | and awk | sort ./textfile.txt
66: the
54: and
32: I
16: unix
12: bash
5: internet
3: sh
1: GNU/Linux
So it does not search line-by-line, but word by word, and it does it for all the words, not just for 1 word.
I'm trying to search multiple files for words using strings and grep
How would I do this?
For example I'm looking for the word "bob" within 200 txt files and html files
I would also like to print them out to a txt file with the path name.
I am also using backtrack if thats any help
Hi im trying a GREP a varaiable which contains a file name and i search it in a list of .txt file and ifs its found the .txt file , it returns the name of the txt file name..the snippet im using is
Code:
foreach my $files (glob('*.txt'))
{
open(my $fh1, $files) or die("Unable to open '$files': $!");
{
if ( grep /$file/, <$fh1> )
{
$Sheet->Cells($row,$col+1)->{'Valu
I have a text file and looking for the single line bird. Using OS X Lion and grep 2.5.1.
this works:
grep '^bird' file.txt
but this doesn't
grep '^bird$' file.txt
There is not a blank space at the end of the line. What am I doing wrong?
thx