Uniq tag

Hello,
I have recently imported all my scripts into OS X. There is one unix command that is problematic in the new environment:

sort temp7.txt | uniq -u -w4 > temp8.txt

The system doesn't seem to like the -w tag. Is there an alternative command?
Here is the objective:

Data:

1234 aaa bbb
2345 www eee
3456 rrr ttt
4567 ttt yyy
2345

Output:

1234 aaa bbb
3456 rrr ttt
4567 ttt yyy

Thanks!

sort -u -k 1.1,1.4 temp7.txt

Try that.

1 Like