bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using SORT on Linux


From: Bob Proulx
Subject: Re: Using SORT on Linux
Date: Tue, 21 Mar 2006 23:36:38 -0700
User-agent: Mutt/1.5.9i

Oshea, Richard wrote:
> Not sure if this is a bug or a problem with the way my environment
> it setup - or the way I'm using sort - But...  Given the following
> data in a file, the sort command does not produce the correct
> output.

Are you passing any options to sort?

> I have even tried setting the LC_ALL as suggested in the sort --help
> (set LC_ALL=C)

"set LC_ALL=C"?  What shell are you using?  Try this:

  env LC_ALL=C sort

> AG        1
> AG2       3
> AG2       2
> AG3       4
> AG        4
> AG3       3
> AG4       5
> AG4       6
> 
> The results are
> 
> AG        1
> AG2       2
> AG2       3
> AG3       3
> AG3       4
> AG        4
> AG4       5
> AG4       6

Check the whitespace characters.  Are there non-printable characters
there?

> I would expect the output to be more like ...
> 
> AG        1
> AG        4
> AG2       2
> AG2       3
> AG3       3
> AG3       4
> AG4       5
> AG4       6

That is the result I get on my machine when I test with your input.

What version of sort are you using?  What operating system are you
working on?  What locale are you using?

  sort --version
  uname -a
  locale

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]