Skip to content

Instantly share code, notes, and snippets.

@sokil
Last active September 1, 2016 11:38
Show Gist options
  • Save sokil/22079eee01b0e1b3d84acc04753a4ef2 to your computer and use it in GitHub Desktop.
Save sokil/22079eee01b0e1b3d84acc04753a4ef2 to your computer and use it in GitHub Desktop.
#!/bin/bash
# delimited by tab
join -t $'\t' <(cat file1 | sort) <(cat file2 | sort)
# join fields
join -t $'\t' -a1 -e 'NULL' -o auto <(cat file1.csv | sort) <(cat file2.csv | sort | uniq -w 32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment