perl -i.bak -ne 'print unless $h{$_}++' file
However, since these solutions store unique lines in memory they are potentially slow for very large files.
--
John.
In reply to Re: Re: Re: Removing repeated lines from file
by jmcnamara
in thread Removing repeated lines from file
by matth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |