Public bug reported:

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)

** Affects: coreutils (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug precise

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1050277

Title:
  sort and join disagree on sort order

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/1050277/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to