join
From Initq
join is used to join two files line by lines. By default it uses the first field to make a match but you can change this field with -1 and -2 flags. If you turn of case sensitivity by -i.
join -1 3 -2 2 -i people.txt numbers.txt
This command will try to match the third field of file people.txt with the second field of file numbers.txt without any case sensitivity and write the output on the screen with the matching field first, then the corresponding fields from file people.txt and then the corresponding fields from numbers.txt file.
The default delimiter is whitespace but this can be changed with -t.
