Skip to content

Instantly share code, notes, and snippets.

@fijimunkii
Created March 23, 2014 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fijimunkii/9730893 to your computer and use it in GitHub Desktop.
Save fijimunkii/9730893 to your computer and use it in GitHub Desktop.
sh: diff alternatives
comm -13 <(sort file1) <(sort file2) > file3
grep -Fxvf file1 file2 > file3
diff file1 file2 | grep "<" | sed 's/^<//g' > file3
join -v 2 <(sort file1) <(sort file2) > file3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment