Name:Fast catalogue merging
Category:Linux
Author:Brian
Tip:

If you have simple catalogues (say, lists of objects, RAs and DECs) to merge by field matching, a simple and fast way to get the merging done (way faster than awk) is to use the Linux command "join".  Just remember you always have to presort the files on the field to be matched (use the Linux command "sort" but make sure before you sort that the environment variables are set to do the kind of sort you want;  I like setenv LC_COLLATE C).  If you don't get your presort right, join will behave in a buggy manner.

The Linux command "comm" is also useful for very specific cases of merging.