in reply to creating a new file with unique values


Here is a one-liner that should do it, the command line options are explained in perlrun:
perl -lne '/\tCM+(\d+)/; print $1 if defined $1 and not $seen{$1}++' f +ile1 > file2

--
John.