3 ms·
I recently got to use `join`. However, without reading documentation on outer joins. I went ahead and wrote my own version: join -t$'\t' <(cat c <(comm -13 <
by minhajuddin 9y ago
I recently got to use `join`. However, without reading documentation on outer joins. I went ahead and wrote my own version:
join -t$'\t' <(cat c <(comm -13 <(cut -f1 c) <(cut -f1 d) | sed -e 's/$/\t/') | sort -k1,1) <(cat d <(comm -23 <(cut -f1 c) <(cut -f1 d) | sed -e 's/$/\t/') | sort -k1,1)
Then I stumbled on an easier version with using just join
join -a1 -a2 -o auto f1 f2
There are really too many unexplored things on the linux command line for a typical dev.