in reply to comparing lists
Update: Grandfather's code is of course more relevant for you, and neater, because it does a bunch of files in one swoop. My own tool just compares two lists at a time (like "diff" or "cmp"), but for many cases, you can just chain runs together through a pipe -- e.g. print rows in file1 whose initial field does not match any rows in file2 or file3, and do match rows in file4:
cmpcol -x1 -l1 file1 file2 | cmpcol -x1 -l1 stdin file3 | cmpcol -i -l +1 stdin file4
|
|---|