commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
This command compares file2 with file1 and removes the lines that are in file1 from file2. Handy if you have a file where file1 was the origional and you want to remove the origional data from your file2.
There is 1 alternative - vote for the best!
If both file1 and file2 are already sorted:
comm -13 file1 file2 > file-new
If you can do better, submit your command here.
You must be signed in to comment.