Package: coreutils Version: 5.2.1-2 Severity: minor
Manual page and info page for sort(1) reads: -k, --key=POS1[,POS2] start a key at POS1, end it at POS 2 (origin 1) POS is F[.C][OPTS], where F is the field number and C the character position in the field. OPTS is one or more single-letter ordering options, which override global ordering options for that key. If no key is given, use the entire line as the key. And "info coreutils sort" reads: 7.1 `sort': Sort text files =========================== ... `-k POS1[,POS2]' `--key=POS1[,POS2]' Specify a sort field that consists of the part of the line between POS1 and POS2 (or the end of the line, if POS2 is omitted), _inclusive_. Fields and character positions are numbered starting with 1. So to sort on the second field, you'd use `--key=2,2' (`-k 2,2'). See below for more examples. but this is silent about OPTS referred in manual page. The basic manual page further does not give must rope to understand -k. PROBLEMS The manual page, as it is now, does not give sufficient details how to use -k option. The OPTS part is not explained well. The manual page also would better refer to "info coreutils sort" than "info sort". SUGGESTION I suggestest that something similar what appers in following page, is added to the manual so that ad hoc questions "man sort" would give enough details for day to day operation. http://www.opengroup.org/onlinepubs/009695399/utilities/sort.html -k keydef The keydef argument is a restricted sort key field definition. The format of this definition is: field_start[type][,field_end[type]] where field_start and field_end define a key field restricted to a portion of the line (see the EXTENDED DESCRIPTION section), and type is a modifier from the list of characters 'b', 'd', 'f', 'i', 'n', 'r'. The 'b' modifier shall behave like the -b option, but shall apply only to the field_start or field_end to which it is attached. The other modifiers shall behave like the corresponding options, but shall apply only to the key field to which they are attached; they shall have this effect if specified with field_start, field_end, or both. If any modifier is attached to a field_start or to a field_end, no option shall apply to either. Implementations shall support at least nine occurrences of the -k option, which shall be significant in command line order. If no -k option is specified, a default sort key of the entire line shall be used. -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.9-1-686 Locale: LANG=C, LC_CTYPE=C (charmap=ISO-8859-1) (ignored: LC_ALL set to en_US) Versions of packages coreutils depends on: ii libacl1 2.2.29-1 Access control list shared library ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]