Created
February 24, 2017 06:52
-
-
Save ftorto/9e268900f1fbd62448e8fd9c9015c97f to your computer and use it in GitHub Desktop.
Compare 2 lists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List common lines in $1 and $2 | |
function common { | |
comm --check-order -12 $1 $2 | |
} | |
# List lines only present in $1 | |
function onlyina { | |
comm --check-order -3 $1 $2 | sed '/\t/d' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment