sort and join disagree on sort order

Bug #1050277 reported by Stephen Baynes
14
This bug affects 3 people
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
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
Uname: Linux 3.2.0-29-generic x86_64
NonfreeKernelModules: nvidia
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)

Revision history for this message
Stephen Baynes (stephen-baynes) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in coreutils (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.