The default column width is 80, but this may be overridden using the
-w flag. For historical reasons, the width may be specified directly, as in fold -72
, omitting the -w.
The -s flag causes breaks to occur after whitespace rather than in the middle of a word. This produces a ragged right edge, but is much nicer to look at.
The -b flag makes the program ignore embedded backspaces, tabs, and carriage returns when deciding where to split. This makes it run about thirty times faster. You might want to get used to using -b.
Current locale settings will be honored in determining what is meant by ``whitespace'' and ``word characters''.
expand,
fmt
This code is freely modifiable and freely redistributable under Perl's Artistic License.