sort -uo file.txt file.txt
Update: For those that asked,
sort -u file.txt > file.txt
will completely and happily change file.txt
into a zero byte file, hence the need for
the "o" flag.
In reply to Re: Re: Re: Detecting duplicate entries
by turnstep
in thread Detecting duplicate entries
by r.joseph
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |