Package: coreutils
Version: 5.97-5.3
Severity: normal

(Note: by "first reading" I mean "first reading LATELY", not
"first reading EVER".)

Good old 'sort'!  On a recent first reading, not easy:

    % man sort | grep "\-\-fi" -nA 1
    61:       -t, --field-separator=SEP
    62-              use SEP instead of non-blank to blank transition

...especially puzzling seemed the noun 'non-blank', (whatever that is),
neighboring 'to blank' (is that 2nd 'blank' a noun or a verb?).  After some
research, I eventually deduced that "non-blank to blank(noun)
transition" means 'whitespace'.

Also, on first reading I confused the "field" in 'field-separator' to
mean whole lines.  e.g. it seemed as though this:

    echo c b a | sort -t " "

...would output this (it doesn't of course):

    a b c

The 'info' description is better, if lengthy:

    % info coreutils sort | grep  "\-\-fi" -nA 11
    206:`--field-separator=SEPARATOR'
    207-     Use character SEPARATOR as the field separator when finding the
    208-     sort keys in each line.  By default, fields are separated by the
    209-     empty string between a non-blank character and a blank character.
    210-     That is, given the input line ` foo bar', `sort' breaks it into
    211-     fields ` foo' and ` bar'.  The field separator is not considered
    212-     to be part of either the field preceding or the field following,
    213-     so with `sort -t " "' the same input line has three fields: an
    214-     empty field, `foo', and `bar'.  However, fields that extend to the
    215-     end of the line, as `-k 2', or fields consisting of a range, as
    216-     `-k 2,3', retain the field separators present between the
    217-     endpoints of the range.

Suggested concise revision (for man page):

           -t, --field-separator=SEP
                  delimit keys with SEP, (instead of default whitespace)

NB: I do know how to use the 'sort' keys now, and have in the past.
It's just one of those things so rarely used, that you learn it, use
it, and admire it; then don't use for a few months or years, forget,
look up in the man page, and get mixed up all over again.  "Easy
to read" text isn't just for novices or 'newbies'.

Hope this helps...




-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-4-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/dash

Versions of packages coreutils depends on:
ii  libacl1                       2.2.42-1   Access control list shared library
ii  libc6                         2.5-7      GNU C Library: Shared libraries
ii  libselinux1                   2.0.15-2   SELinux shared libraries

coreutils recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to