Here is my command:
awk 'FNR==NR{arr[$1];next}!($3 in arr)' supp.txt data.txt > res.txt
Where supp.txt 's content is similar to:
hash1
hash2
hash3
and data.txt :
8723 email hash1
8724 email hash4
8725 email hash5
The values are different and the files can be up to 1Gb of size, res.txt is supposed to have data.txt minus the lines existing in supp.txt
So res.txt should be something like this:
8724 email hash4
8725 email hash5
This works just fine with small files, but files are as big as 10Mb are failing without any error message, the function simply copies data.txt to res.txt, allowing values from supp.txt even though they're supposed to be removed.
Why is this happening ? and what is the work around?
I learned AWK basics, which helped me make sense of the command but nothing more than that I googled the issue, without any luck on finding a similar one I made sure I have enough memory just in case