can not get "grep -f" to work with RHEL 4.x
I am embarassed to post such a simple question, but this is driving me nuts. The "grep -f" command just does not seem to work.
I am absolutely positive that the string exists in one of the files in the list. I have tried every combination I can imagine:
Note:
file_with_string.txt = a file with a single string
list_of_files_to_search.txt = a file which lists other files in the directory
I have tried all of the following:
grep -f file_with_string.txt list_of_files_to_search.txt
grep -f list_of_files_to_search.txt file_with_string.txt
grep file_with_string.txt -f list_of_files_to_search.txt
grep 'string' -f list_of_files_to_search.txt
grep -f list_of_files_to_search.txt 'string'
grep -f 'string' list_of_files_to_search.txt
and so on. I have also tried egrep. I can not get anything to work.
|