I'm trying to get the unique values from the list below, but leaving the unique values in the original order.
This is, the order of appearance.
group
swamp
group
hands
swamp
pipes
group
bellyful
pipes
swamp
emotion
swamp
pipes
bellyful
after
bellyful
I've tried combining sort
and uniq
commands but the output is sorted alphabetically, and if I don't use sort command, uniq command doesn't work.
$ sort file | uniq
after
bellyful
emotion
group
hands
pipes
swamp
and my desiree output would be like this
group
swamp
hands
pipes
bellyful
emotion
after
How can I do this?