문제

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"

도움이 되었습니까?

해결책

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!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top