Oops sorry, my last post was incomplete.
If the input data was:
foo,foo bar,foobar,blah,123,boo,boo bar,boobar
foo,foo bar,foobar,blah,345,boo,boo bar,boobar
foo,foo bar,foobar,halb,345,boo,boo bar,boobar
foo,foo bar,foobar,blah,234,boo,boo bar,boobar
foo,foo bar,foobar,blah,345,oob,boo bar,boobar and so on.
foo,foo bar,foobar,blah,234,boo,boo bar,boobar
ie. if the key were the same but other fields differed.
My understanding of uniq is that it looks at the full record and not just the sort key. So as per my understanding there would 3 distinct records for code 345. So I thought that the sorted output had to be piped to `awk`. (I don't have acces to a unix machine right now and so can't check it out).
End
|