grep this_word this_file.txt
This command uses regular expressions, for more information please see, the Section called Regular Expressions in Chapter 20.
grep rpm rpmlist.txt
A "recursive" version of grep (this is a different program to grep). This will search all the files in the current directory and all it's subdirectories and print the names of the files and the matching line. Follows similar syntax to grep (see above). You could also use grep with the -r option to achieve the same affect.
For example you could type:
fgrep 'a$*b?' file.txt
And fgrep would look for the string “a$*b?” in the file “file.txt”.
Other Versions: There are various versions of grep which are designed to do different things try searching for them on the internet or within your distribution.