Quote:
Originally Posted by
alister
The sorts should be restricted to the join key, but your sorts use the entire line.
In this case it's the same, since "SERVER1:user" is always the same, always at the beginning of every line, as far as I understand. So why bother?
Quote:
The sort should not be numeric (human readable or otherwise). join expects a lexicographical sort in the same collation sequence.
Unless the sort key (the entire line in this case) begins with a valid number, the -h has no effect. The absence of a valid leading number is interpreted as a 0. Since all lines in your data sample compare equal to 0, the tie is broken using a lexicographical sort of the entire line.
The correct sort would be: sort -b -t: -k2,2
You're right: the "-h" has no sense. I don't remember why I put it in the command line. My fault. However it has no effect, and, again, sort alone, with no options, is enough in this case.
Quote:
I realize that this is for a Linux machine, but -j2 instead of -12 -22? Why? You lose the ability to run that join on any implementation
I'm sorry, I didn't know it. Thanks.
--
Bye