Skip to content

Instantly share code, notes, and snippets.

@Hiteshm01
Created February 8, 2015 17:17
Show Gist options
  • Save Hiteshm01/20c3de8c4ac66844d281 to your computer and use it in GitHub Desktop.
Save Hiteshm01/20c3de8c4ac66844d281 to your computer and use it in GitHub Desktop.
Union Intersection and difference
cat a b | sort | uniq > c # c is a union b
cat a b | sort | uniq -d > c # c is a intersect b
cat a b b | sort | uniq -u > c # c is set difference a - b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment