Skip to content

Instantly share code, notes, and snippets.

@akiniwa

akiniwa/multicoljoin.sh

Last active Dec 27, 2015
Embed
What would you like to do?
#!/bin/sh
awk '{printf("%s:%s %s %s %s\n", $1, $2, $1, $2, $3);}' file1.txt | sort > sort1
awk '{printf("%s:%s\n", $1, $2);}' file2.txt | sort > sort2
join -1 1 -2 1 -o 1.2,1.3,1.4 sort1 sort2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.