Which could be condensed to:
perl -ne 'print unless $seen{$_}++' in.txt > out.txt
and if you fancy replacing it directly, whilst makign a backup file:
perl -i.bak -ne 'print unless $seen{$_}++' in.txt
--
Steve Marvell
In reply to Re: Re: finding and deleting repeated lines in a file
by marvell
in thread finding and deleting repeated lines in a file
by Becky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |