Gnu-Guys: I dunno, but somehow this looks like a bug to me. Does this look like a bug to you, or am I making some bad assumptions here...? [systest@gumbum SortBugs]$ cat /etc/issue Red Hat Linux release 6.2 (Zoot) Kernel 2.2.14-5.0 on an i586 [systest@gumbum SortBugs]$ Here are the files to sort: [systest@gumbum SortBugs]$ cat foo1 1-2-1-4-4 1-2-1-4-3 1-2-1-4-2 1-2-1-4-1 1-2-1-4 [systest@gumbum SortBugs]$ cat foo2 1-2-1-4-4: 1-2-1-4-3: 1-2-1-4-2: 1-2-1-4-1: 1-2-1-4: [systest@gumbum SortBugs]$ cat foo3 1-2-1-4-4:a 1-2-1-4-3:b 1-2-1-4-2:c 1-2-1-4-1:d 1-2-1-4:e [systest@gumbum SortBugs]$ Now, lets sort these files using ":" as the key delimeter TEST #1 [systest@gumbum SortBugs]$ sort -d -t: -k1 foo1 1-2-1-4 1-2-1-4-1 1-2-1-4-2 1-2-1-4-3 1-2-1-4-4 Yeah, I expected this result, lets move on to the next... TEST #2 [systest@gumbum SortBugs]$ sort -d -t: -k1 foo2 1-2-1-4: 1-2-1-4-1: 1-2-1-4-2: 1-2-1-4-3: 1-2-1-4-4: Still lookin' good, next... TEST #3 [systest@gumbum SortBugs]$ sort -d -t: -k1 foo3 1-2-1-4-1:d 1-2-1-4-2:c 1-2-1-4-3:b 1-2-1-4-4:a 1-2-1-4:e Whoa! Not what I expected! Lets look at foo2 again, without alphanumeric key restriction... TEST #4 [systest@gumbum SortBugs]$ sort -t: -k1 foo2 1-2-1-4-1: 1-2-1-4-2: 1-2-1-4-3: 1-2-1-4-4: 1-2-1-4: Well, OK, I guess so, but ":" is the delimeter, so why is it being considered in the sort? Now another sanity check on key position "2" TEST #5 [systest@gumbum SortBugs]$ sort -d -t: -k2 foo3 1-2-1-4-4:a 1-2-1-4-3:b 1-2-1-4-2:c 1-2-1-4-1:d 1-2-1-4:e [systest@gumbum SortBugs]$ Looks OK to me... QUESTION: Can you explain what is happening in TEST #3 and TEST #4? Is this expected behavior, or a bug? tnx, Harry -- Harry Rarig _/ _/ _/ _/_/_/ _/_/_/ _/ _/ Tellium Inc. _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/ 732 923-4249 Voice _/ _/ _/ _/ _/ _/ _/ _/ _/ 732 923-9804 Fax ___________________________________/ System Test ====>> "We break the things that make communications work" _______________________________________________ Bug-textutils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-textutils
