http://qs1969.pair.com?node_id=61604


in reply to Re: Re: Detecting duplicate entries
in thread Detecting duplicate entries

And to do it all at once as an inline edit:
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.