bug-textutils
[Top][All Lists]
Advanced

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

Re: sort -d does not produce dictionary order


From: Bob Proulx
Subject: Re: sort -d does not produce dictionary order
Date: Sat, 14 Jun 2003 11:14:14 -0600
User-agent: Mutt/1.3.28i

Jeff Orrok wrote:
> address@hidden root]# sort --version
> sort (textutils) 2.0.21
> Redhat Linux 7.3

Thanks for your report.  But I can't recreate it with either sort 2.0
or the newer coreutils 5.0.  Therefore I suspect this may have
something to do with LANG in your environment.  (LANG is almost always
the problem with sort on RH and so I always suspect it.)  What is your
locale setting?  Does changing it to "C" or "POSIX" correct your
problem?

  locale

  export LC_ALL=C

> According to the man page, -d gives dictionary order,

Just because I looked I am going to share with the list.  There have
been changes to the documentation of this at least.

The man page is generated from the 'sort --help' output so those will
always be the same.  It says this with coreutils 5.0:

  -d, --dictionary-order      consider only blanks and alphanumeric characters

It used to say this with textutils 2.0:

  -d     consider only [a-zA-Z0-9 ] characters in keys

The info page is the true source of documentation and with coreutils
5.0 it says:

  `-d'
  `--dictionary-order'
     Sort in "phone directory" order: ignore all characters except
     letters, digits and blanks when sorting.  The `LC_CTYPE' locale
     determines character types.

It used to say this with textutils 2.0:

  `-d'
     Sort in "phone directory" order: ignore all characters except
     letters, digits and blanks when sorting.

The latest version of the coreutils package is here:

  ftp://ftp.gnu.org/gnu/coreutils/coreutils-5.0.tar.bz2
  (coreutils is the union of fileutils, textutils, and sh-utils)

Bob




reply via email to

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