I am trying to clean an email list with huge data.

When I try this:

pv "Email-Raw.txt" | grep -vf <(sed 's/^/^/; s/$/$/' Segment00.txt) > RESULT-1.txt

I get grep: memory exhausted

How do I solve this? Please help.

  • What's the output of wc Segment00.txt? – Adrian Feb 11 at 3:57

As, in this case, I wanted to match the EXACT MATCH of the whole line, I solved it by modifying the command to - pv "Email-Raw.txt" | grep -vxFf Segment00.txt) > RESULT-1.txt

Note: this may not work if you partially want to match text in each line.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.