Quote:
Originally Posted by noir911
I have one file with
another file with
Is there any way to tell diff to ignore "test" since it appears in both the files and only show "NOTtest" as the diff result since it's not on the other file?
|
As far as I know, diff will not do this procedure.
grep -v will remove lines... you could do something like:
for i in `cat file2`; do cat file1 | grep -v $i; done
which will result in the correct results, but i suspect only because your example is overly simplified. You could also do this fairly easily in perl in a much more robust way.
heck, even grep -v `cat file2` file1 should return the results you want for that particular example.