From: Pádraig Brady Date: Mon, 8 Mar 2010 08:48:14 +0000 (+0000) Subject: doc: Add an example for cutting fields separated by runs of blanks X-Git-Tag: v8.5~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=612c2c95c35f9743bbaaf64d0b9856621e7558d2;p=platform%2Fupstream%2Fcoreutils.git 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. --- diff --git a/doc/coreutils.texi b/doc/coreutils.texi index fcee336..3e7a698 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}