diff options
author | Pádraig Brady <P@draigBrady.com> | 2010-03-08 08:48:14 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2010-03-09 00:32:07 +0000 |
commit | 612c2c95c35f9743bbaaf64d0b9856621e7558d2 (patch) | |
tree | 7333271c4f0472c49d759490fe6c4d125cb9c928 | |
parent | a7b4fa01ddde3f09eb642cb6378e16522917f8e0 (diff) | |
download | coreutils-612c2c95c35f9743bbaaf64d0b9856621e7558d2.tar.xz |
doc: Add an example for cutting fields separated by runs of blanks
* doc/coreutils.texi (cut invocation): Show how tr can be used
to process the input for cut in this case.
Suggestion from Dan Jacobson.
-rw-r--r-- | doc/coreutils.texi | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi index fcee33618..3e7a69868 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -5318,7 +5318,13 @@ of selected bytes. Select for printing only the fields listed in @var{field-list}. Fields are separated by a TAB character by default. Also print any line that contains no delimiter character, unless the -@option{--only-delimited} (@option{-s}) option is specified +@option{--only-delimited} (@option{-s}) option is specified. +Note @command{cut} does not support specifying runs of whitespace as a +delimiter, so to achieve that common functionality one can pre-process +with @command{tr} like: +@example +tr -s '[:blank:]' '\t' | cut -f@dots{} +@end example @item -d @var{input_delim_byte} @itemx --delimiter=@var{input_delim_byte} |