Привет
neko@takinowork:~/test$ echo -e "a\nb\nc\na\ne\nf\ne"|uniq
a
b
c
a
e
f
e
neko@takinowork:~/test$ echo -e "a\nb\nc\na\ne\nf\ne"|sort|uniq
a
b
c
e
f
Filter adjacent matching lines from INPUT (or standard input), writing to OUTPUT (or standard output).
А почему так сделано?