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
?
Best Answer
That's the job for uniq:
If you want other tools, like
perl
: