|FOLD(1)||General Commands Manual||FOLD(1)|
foldis a filter which folds the contents of the specified files, or the standard input if no files are specified, breaking the lines to have a maximum of 80 display columns.
The options are as follows:
-b is specified, a backspace
character decrements the column position by one, a carriage return resets
the column position to zero, and a tab advances the column position to the
next multiple of eight.
foldutility exits 0 on success, and >0 if an error occurs. expand(1), fmt(1)
foldutility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification.
foldutility first appeared in 1BSD. It was rewritten for 4.3BSD-Reno to improve speed and modernize style. The
-soptions were added to NetBSD 1.0 for IEEE Std 1003.2 (“POSIX.2”) compliance. Bill Joy wrote the original version of
foldon June 28, 1977. Kevin Ruddy rewrote the command in 1990, and J. T. Conklin added the missing options in 1993. roff(7) output semantics, implemented both by GNU nroff and by mandoc(1), only uses a single backspace for backing up the previous character, even for double-width characters. The
foldbackspace semantics required by POSIX mishandles such backspace-encoded sequences, breaking lines early. The fmt(1) utility provides similar functionality and does not suffer from that problem, but isn't standardized by POSIX.
|October 24, 2016||OpenBSD-current|