Stan, If you can put the groups one per line in files, then you could try comm. Comm will output lines common to both, in file1 but not file2, in file2 but not file1, or any combination you want. Danny