Wednesday, May 4, 2016
Merging multiple files using first column as hash keys with awk
Lets say you have multiple files with the same first column and you want to merge them. Use this awk code, note that this makes sense only if the elements of the first column are the same (order is not important) as only in that case the output table order is preserved.
Save as e.g. script.awk. Here is an example of merging 4 files into one composite: