coreutils: fold invocation
1
1 4.3 ‘fold’: Wrap input lines to fit in specified width
1 ======================================================
1
1 ‘fold’ writes each FILE (‘-’ means standard input), or standard input if
1 none are given, to standard output, breaking long lines. Synopsis:
1
1 fold [OPTION]... [FILE]...
1
1 By default, ‘fold’ breaks lines wider than 80 columns. The output is
1 split into as many lines as necessary.
1
1 ‘fold’ counts screen columns by default; thus, a tab may count more
1 than one column, backspace decreases the column count, and carriage
1 return sets the column to zero.
1
11 The program accepts the following options. Also see ⇒Common
options.
1
1 ‘-b’
1 ‘--bytes’
1 Count bytes rather than columns, so that tabs, backspaces, and
1 carriage returns are each counted as taking up one column, just
1 like other characters.
1
1 ‘-s’
1 ‘--spaces’
1 Break at word boundaries: the line is broken after the last blank
1 before the maximum line length. If the line contains no such
1 blanks, the line is broken at the maximum line length as usual.
1
1 ‘-w WIDTH’
1 ‘--width=WIDTH’
1 Use a maximum line length of WIDTH columns instead of 80.
1
1 For compatibility ‘fold’ supports an obsolete option syntax
1 ‘-WIDTH’. New scripts should use ‘-w WIDTH’ instead.
1
1 An exit status of zero indicates success, and a nonzero value
1 indicates failure.
1