Skip to content

Instantly share code, notes, and snippets.

@explodecomputer
Created June 12, 2015 16:29
Show Gist options
  • Save explodecomputer/3dadf15d1da2e06f29c9 to your computer and use it in GitHub Desktop.
Save explodecomputer/3dadf15d1da2e06f29c9 to your computer and use it in GitHub Desktop.
Make exclusion lists based on full list and inclusion list
#!/bin/bash
all=${1}
subset=${2}
out=${3}
temp1=temp${RANDOM}
temp2=temp${RANDOM}
awk '{ print $1, $2 }' $all > ${temp1}
awk '{ print $1, $2 }' $subset > ${temp2}
diff --new-line-format="" --unchanged-line-format="" ${temp1} ${temp2} > $out
rm ${temp1} ${temp2}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment