KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
grep -F -f file1 file2 file1 is 90 Mb (2.5 million lines, one word per line) file2 is 45 Gb That command doesn't actually produce anything whatsoever, no matter how long I leave it running. Clearly, this is beyond grep's scope. It seems grep can't handle that many queries from the -f option. However, the following command does produce the desired result: head file1 > file3 grep -F -f file3 file2 I have doubts about whether sed or awk would be appropriate alternatives either, given the file sizes. I am at a loss for alternatives... please help. Is it worth it to learn some sql commands? Is it easy? Can anyone point me in the right direction?
Tags (comma-separated)
Save Edits
Cancel