fold long lines
fold [-bs] [-w width | -width] [file . . . ]
Fold the contents of the specified
or the standard input if no files are specified,
breaking the lines to have maximum width of
screen columns (or bytes if -b is specified). A line shall not
be broken in the middle of a character (as specified by the locale given
in LC_CTYPE, see LANG on
If a backspace character occurs in the input, the width count
will be decremented by one (but will never go below zero). If a tab character
occurs, the width count is set to the next tab stop. The next tab stop
is the next value of width that is a multiple of eight (counting the
first column as column 0).
Count width in bytes. If this option is not specified, width
is counted in column positions.
If a segment of a line contains a blank within the first
width column positions (or bytes), break the line after the last
such blank meeting the width constraints. If there is no such
blank, -s will have no effect for that output segment of
the input line. (A blank is defined by the current locale's
LC_CTYPE, see LANG on
Specify the maximum width in screen columns (or bytes, if -b is
The default for
should be a multiple of 8 if
are present, or the
should be expanded.
language-specific message file (See LANG on
Folding may not work correctly if underlining or overstriking is present.
The -width option is provided for backward compatibility, it
will be removed in a future release. The -w width option
should be used.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004