summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2009-07-01 15:07:19 +0100
committerPádraig Brady <P@draigBrady.com>2009-07-03 16:49:04 +0100
commit962878499cf09453fd08bbf57fbecd75994971d4 (patch)
treeab62605566c639c59b9dd6ec59090770ae1ba458 /doc
parent3e565eb3a6a6d8992489195f5c0fd84d4246b800 (diff)
downloadcoreutils-962878499cf09453fd08bbf57fbecd75994971d4.tar.gz
doc: update the info on sort -b and -k
* doc/coreutils.texi (sort invocation): Mention in the description of -b, 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.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi16
1 files changed, 9 insertions, 7 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 8d248d911..61361ab29 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 --batch-size=@var{nmerge}
@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},
-@option{-g}, @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}