You cite the man page incorrectly! What is written there is this:
fgrep is the same as
grep -F
Note the uppercase -F
which is quite different to -f
!
Domanda
I am trying to grep a list of IDs present in file1 from file2
I write:
grep -f file1 file2
The command gets stuck as if perpetually in the run phase.
Then I try:
fgrep -f file1 file2
This works in a flash. The man page of grep says that fgrep is same as "grep -f". But then how come I get no output for "grep -f"
Soluzione
You cite the man page incorrectly! What is written there is this:
fgrep is the same as
grep -F
Note the uppercase -F
which is quite different to -f
!