fold(1)
Name
fold − fold long lines for finite width output device
Syntax
fold [−b] [−s] [−w width or −width] [file...]
Description
The fold command is a filter which folds the contents of each specified file, or the standard input if no file is specified, breaking the lines to have maximum width width.
Options
−bCauses each ‘<backspace>’ in a line to be interpreted as decrementing the line length by one.
−sBreaks the line on the last <blank> character found before the specified length. If none are found the line breaks at the specified length.
−w width or −width
Specify the maximum line width, in bytes. The default value is 80. The width should be a multiple of 8 if tabs are present, or the tabs should be expanded using expand() before coming to fold.
Restrictions
The fold command may interfere with underlining.
Return Values
The fold command returns zero (0) on successful completion.