[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bug w/sort: As of coreutils-5.9x, sort loses command-line c
Re: Possible bug w/sort: As of coreutils-5.9x, sort loses command-line column offset (e.g. +1.0n)
Fri, 14 Apr 2006 18:31:56 -0700
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)
"John P. Eisenmenger" <address@hidden> writes:
> Recently my coreutils package upgraded from version 5.2.1 to version
> 5.94. With the new version, specifying columnar offsets on the
> command line no longer works.
Commands like "sort +1.0" didn't work with 5.2.1 either, unless you
built it in an environment that specified pre-2001 POSIX. Perhaps
there was something different about how you built it this time?
The background is this. In 1992 the wonderful folks at POSIX changed
the syntax of "sort", saying that you're supposed to use the -k option
instead of funky options like +1.0. They said the old syntax would
still work, but it was obsolescent. In 2001 they removed the old
syntax entirely; conforming implementations are supposed to sort a
file named "+1.0" instead.
When you build coreutils, you can specify which version of POSIX you
want it to conform to by default. You can override this at runtime
by setting an environment variable.
(My suggestion is to use "sort -k" instead, though.)