Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: If it's not broken, don't fix it

by merlyn (Sage)
on Dec 21, 2001 at 22:21 UTC ( [id://133827]=note: print w/replies, xml ) Need Help??


in reply to If it's not broken, don't fix it

Somewhere in my Unix experience, I picked up on the fact that sort -u only "uniq"s over the fields that it is examining, so to get the exact equivalent of sort | uniq, you need to do a final "sort" on the entire string.

This is a feature, not a bug.

But I disagree with your conclusion. Your error is in the prior statement:

Aha! With multiple keys, sort -u does not behave as I had assumed.
The good ol' "assume" word there. Bad. That's the error, not messing with unbroken things. I may agree with your statement in principal, but this was a bad example, as it's sort of a double fault accident.

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://133827]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-20 02:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found