More tips:
mawk
<()
$ clean () { sed 's/^[0-9]*//' "$@" | LC_ALL=C sort -u; } $ comm -12 <(clean file1) <(clean file2) # finds common entries in file1 and file2 after removing some cruft from both
More tips:
mawkis often much faster than the other awks (as long as you can live without gnu extensions).<()style redirection, e.g.