in reply to associations and sorting
At least in Bash, $'\t' gives a tab. I'm not sure about other shells. You can always use a literal tab in quotes. The output will have the join field first, followed by the first field of file1, then all the fields (except the first) of file2. It will be sorted (lexically) by the join field. This will handle any size file as long as you have enough disk space.sort -t$'\t' -k 2,2 file1 >file1a sort -t$'\t' file2 >file2a join -t$'\t' -1 2 file1a file2a >file3
|
|---|