fold — Filter for Folding Lines


/usr/bin/fold [-bs][-w width | -width][file...] 


The fold command is a filter that folds lines from its input files, breaking the lines to have a maximum of width column positions (or bytes, if you specify the -b option). Lines are broken by inserting a newline character so that each output line (referred to later in this section as a segment) is the maximum width possible that does not exceed the specified number of column positions (or bytes). A line is not broken in the middle of a character. The behavior is undefined if width is less than the number of columns any single character in the input would occupy.

If the Return, backspace, or Tab characters are encountered in the input and ...

Get Solaris™ 7 Reference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.