It looks like you forgot to sort before you uniq.
Most uniq programs I've worked with require the data to be sorted first; they just store the last line in memory for comparisons. Since you've got to run sort anyway, you can use the -u flag. -- http://www.lightconsulting.com/~travis/ -><- "We already have enough fast, insecure systems." -- Schneier & Ferguson GPG fingerprint: 50A1 15C5 A9DE 23B9 ED98 C93E 38E9 204A 94C2 641B