Fields in a data table can be specified with either a field name or a field number. Name and number don’t have to be the same in different files, so that a “FirstName” field could be field 3 in table A and field 4 in table B. Here I show how AWK can be used to build a concordance table that lists the field numbers for the same field names in two or more tables.
Source: LXer – How to build a multi-file fields concordance