in reply to creating a new file with unique values

perl -nle "print $1 if /^CM(\d+)/i and ++$h{$1} ==1; " numbers >unique

(Adjust quotes to system reqs.)


Examine what is said, not who speaks.

The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.

  • Comment on Re: creating a new file with unique values