[Bug 1152622] Re: Sort fails to sort
C de-Avillez
hggdh2 at ubuntu.com
Sat Mar 9 22:07:37 UTC 2013
Thank you for opening this bug and helping make Ubuntu better.
This does not seem to be a bug but rather one or more wrong
expectations:
1. the default field separator for 'sort' is a space; there are no spaces in the data you provided
2. you are running under the en_US.UTF-8 locale; 'sort' output may be affected by the locale in use (see [1])
3. you did not specify a filed to sort on, so 'sort' will use the whole line as a key.
4. you did not specify the field separator.
For your 'fails' dataset, I run sort as:
sort -k1,1 -t: fails
foo:2
foo1:3
Which seems to be what you expected. Please see 'info sort' for the full
documentation of the utility.
I am closing this bug as INVALID (not a bug). Please re-open if you do
not agree with it.
[1] http://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Sort-
does-not-sort-in-normal-order_0021
** Changed in: coreutils (Ubuntu)
Importance: Undecided => Low
** Changed in: coreutils (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to coreutils in Ubuntu.
https://bugs.launchpad.net/bugs/1152622
Title:
Sort fails to sort
Status in “coreutils” package in Ubuntu:
Invalid
Bug description:
To reproduce the problem, run the following:
cat << %%% > works
foo1:2
foo:1
%%%
echo "sort works" | sh -sx
cat << %%% > fails
foo1:3
foo:2
%%%
echo "sort fails" | sh -sx
The output will be:
+ sort works
foo:1
foo1:2
+ sort fails
foo1:3
foo:2
I was expecting the output of "sort fails" to be:
foo:2
foo1:3
% lsb_release -rd
Description: Ubuntu 12.04.2 LTS
Release: 12.04
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: coreutils 8.13-3ubuntu3.2
ProcVersionSignature: Ubuntu 3.2.0-38.61-generic 3.2.37
Uname: Linux 3.2.0-38-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
Date: Fri Mar 8 07:59:21 2013
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
MarkForUpload: True
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: coreutils
UpgradeStatus: Upgraded to precise on 2012-05-02 (309 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/1152622/+subscriptions
More information about the foundations-bugs
mailing list