Using diff and erasing the lines that match
How do I diff two files and erase the lines that are the same without having to go into an editor?
So if i have List A 1 2 3 4 5 6 List B 2 4 6 If i diff these two files, i'd want to be able to have List A -B = C List C 1 3 5 |
Pipe is your friend. Also check sed and awk as they would be helpfull.
I think something like "diff list_A list_B > list_C" would work. |
No, that would just get me output of the diff...i want to actually get rid of any lines that match in List B.
|
Hi,
Using one command: comm -3 list_A list_B man comm for details. Hope this helps. |
That is exactly what I was looking for. THANKS!
|
All times are GMT -5. The time now is 09:24 AM. |