fold(1) fold(1)
NAME
fold - fold long lines
SYNOPSIS
fold [-bs] [-w width | -width] [file . . . ]
DESCRIPTION
Fold the contents of the specified files, or the standard
input if no files are specified, breaking the lines to have
maximum width of width 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 environ(5)].
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).
OPTIONS
-b Count width in bytes. If this option is not specified,
width is counted in column positions.
-s 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 environ (5)]
-w width
Specify the maximum width in screen columns (or bytes,
if -b is specified). The default for width is 80.
width should be a multiple of 8 if tabs are present, or
the tabs should be expanded.
FILES
/usr/lib/locale/locale/LC_MESSAGES/uxdfm
language-specific message file [See LANG on environ(5).]
REFERENCES
fmt(1), pr(1)
Copyright 1994 Novell, Inc. Page 1
fold(1) fold(1)
NOTICES
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.
Copyright 1994 Novell, Inc. Page 2