Quote:
Originally Posted by jim mcnamara
Your example seems to be backwards from your worded request. List1 should be Tom John?
Anyway, one way to do what you seem to ask
Code:
grep -v -f List2 List1> newlist1; mv newlist1 List1
|
Quick question on this. It works nicely when there are just 2 list but what when I try it for a file that has some sentences it doesn't seem to work. For example, List1 is as above but List2 is something like:
List of names
Names:
Anthony
Ed
Bob
Dave
After running the command List1 is empty, like it couldn't match anything from List2 due to the added lines in the beginning. Any ideas? Thanks!