top | item 8022884

(no title)

mattikus | 11 years ago

Sure it does: https://gist.github.com/brettcannon/82c4fe68bac30f4ed653#fil...

discuss

order

moe|11 years ago

Sorry, you are right, I missed that.

Arguably your solution is still different because you sort the input instead of the output, but that's unlikely to matter here.

eridius|11 years ago

The only difference is I sort before uniquing, but the python code uniques before sorting. But the result is identical (and in shell scripting, you can't unique without sorting first).

Although FWIW I just checked and the `sort` tool actually has a flag for uniquing during the sort. I don't know if that's portable though.