Print only unique lines from file not the duplicates
4
votes
5
answers
5992
views
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
?
Asked by user155704
Feb 9, 2016, 02:36 PM
Last activity: Jun 16, 2025, 01:34 AM
Last activity: Jun 16, 2025, 01:34 AM