sort and join disagree on sort order
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
coreutils (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
create file s.txt containing:
1 b:1
1.b:2
1-b:3
1fb:4
sort produces output unchanged from input - so file is sorted. But join does
not think so.
$ sort s.txt
1 b:1
1.b:2
1-b:3
1fb:4
$ join -t : -j 1 --check-order s.txt s.txt
1 b:1:1
join: s.txt:3: is not sorted: 1-b:3
create file j.txt containing (same as s.txt with middle two lines swapped):
1 b:1
1-b:3
1.b:2
1fb:4
sort sorts it back in to the order used in s.txt, but join is happy it is sorted.
$ sort j.txt
1 b:1
1.b:2
1-b:3
1fb:4
$ join -t : -j 1 --check-order j.txt j.txt
1 b:1:1
1-b:3:3
1.b:2:2
1fb:4:4
Applies in both locale en_GB.UTF-8 and in locale C
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: coreutils 8.13-3ubuntu3
ProcVersionSign
Uname: Linux 3.2.0-29-generic x86_64
NonfreeKernelMo
ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
Date: Thu Sep 13 09:53:46 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
ProcEnviron:
LANGUAGE=en_GB:en
TERM=xterm
PATH=(custom, no user)
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: coreutils
UpgradeStatus: No upgrade log present (probably fresh install)
Status changed to 'Confirmed' because the bug affects multiple users.