version 1.0.0, 2013-10-10 : Initial version
"uniq" command by lines and by columns using perl one-liners
Rewriting the uniq shell command and going a little further with perl one-linersThis simple command removes duplicated lines from a given input (file or pipe), keeping only the 1st occurence.
perl -ne 'print if!$u{$_}++'
This command removes lines that have duplicated values in the 2nd column (F[1]), keeping only the first line of the duplicated values.
perl -nae 'print if!$u{$F[1]}++'