[PATCH] doc: update the description of sort -b and -k (original) (raw)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
From: | PƔdraig Brady |
---|---|
Subject: | [PATCH] doc: update the description of sort -b and -k |
Date: | Wed, 1 Jul 2009 15š34 +0100 |
User-agent: | Thunderbird 2.0.0.6 (X11/20071008) |
Updates and clarifications to sort --key and sort -b info
cheers, PƔdraig.
From 40fb295c23658596931684c50f34bd21cbd6f7f7 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?P=C3=A1draig=20Brady?= <address@hidden> Date: Wed, 1 Jul 2009 15:07:19 +0100 Subject: [PATCH] doc: update the description of sort -b and -k
- doc/coreutils.texi (sort invocation): Mention in the -b description that the locale can also affect whether blanks are significant. Update the list of ordering options for a --key that cause it to not inherit any global ordering options. Update the list of ordering options that implicitly skip whitespace.
doc/coreutils.texi | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 8d248d9..61361ab 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -3723,7 +3723,9 @@ so portable shell scripts should specify global options
first.
@vindex LC_CTYPE
Ignore leading blanks when finding sort keys in each line.
By default a blank is a space or a tab, but the @env{LC_CTYPE} locale
-can change this.
+can change this. Note blanks may be ignored by your locale's collating
+rules, but without this option they will be significant for character
+positions specified in keys with the @option{-k} option.
@item -d
@itemx --dictionary-order
@@ -3933,7 +3935,7 @@ according to different rules; see below for details.
Keys can span
multiple fields.
Example: To sort on the second field, use @option{--key=2,2}
-(@option{-k 2,2}). See below for more examples.
+(@option{-k 2,2}). See below for more notes on keys and more examples.
@item address@hidden
@opindex --batch-size
@@ -4102,15 +4104,15 @@ affect the meaning of character positions in field
specifications in
obscure cases. The only fix is to add an explicit @option{-b}.
A position in a sort field specified with @option{-k} may have any
-of the option letters @samp{Mbdfinr} appended to it, in which case the
-global ordering options are not used for that particular field. The
+of the option letters @samp{MbdfghinRrV} appended to it, in which case no
+global ordering options are inherited by that particular field. The
@option{-b} option may be independently attached to either or both of
the start and end positions of a field specification, and if it is
inherited from the global options it will be attached to both.
If input lines can contain leading or adjacent blanks and @option{-t}
-is not used, then @option{-k} is typically combined with @option{-b},
address@hidden, @option{-M}, or @option{-n}; otherwise the varying
-numbers of leading blanks in fields can cause confusing results.
+is not used, then @option{-k} is typically combined with @option{-b} or
+an option that implicitly ignores leading blanks (@samp{MghnV}) as otherwise
+the varying numbers of leading blanks in fields can cause confusing results.
If the start position in a sort field specifier falls after the end of
the line or after the end field, the field is empty. If the @option{-b}
1.6.2.5
[Prev in Thread] | Current Thread | [Next in Thread] |
---|
- [PATCH] doc: update the description of sort -b and -k,PƔdraig Brady <=
- Prev by Date:Re: Will the 'sync' system call cause system crashe
- Next by Date:add "min" and "max" to coreutils?
- Previous by thread:Re: README-prereq update
- Next by thread:add "min" and "max" to coreutils?
- Index(es):