I have a sorted words list, line by line file like so:
apple
apple
grapes
lime
orange
orange
pear
pear
peach
strawberry
strawberry
I only want to print out unique lines and drop duplicates:
grapes
peach
lime
How can I do this with sed
, awk
or perl
?
-l
? Also thefor
after the print is not needed if you remove the-l
, because you aren't pointlessly stripping newlines. – 123 Feb 09 '16 at 15:09