2015-10-08 11:15:08 -04:00
|
|
|
.Dd 2015-10-08
|
2015-01-31 08:20:02 -05:00
|
|
|
.Dt FOLD 1
|
2015-01-31 14:37:03 -05:00
|
|
|
.Os sbase
|
2015-01-25 15:22:17 -05:00
|
|
|
.Sh NAME
|
|
|
|
.Nm fold
|
|
|
|
.Nd wrap lines to width
|
|
|
|
.Sh SYNOPSIS
|
2015-01-30 15:17:58 -05:00
|
|
|
.Nm
|
2015-01-25 15:22:17 -05:00
|
|
|
.Op Fl bs
|
2015-03-13 18:47:41 -04:00
|
|
|
.Op Fl w Ar num | Fl Ns Ar num
|
2015-01-25 15:22:17 -05:00
|
|
|
.Op Ar file ...
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
|
|
|
reads each
|
|
|
|
.Ar file
|
|
|
|
and prints its lines wrapped such that no line
|
|
|
|
exceeds a certain width.
|
|
|
|
If no file is given,
|
|
|
|
.Nm
|
|
|
|
reads from stdin.
|
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl b
|
|
|
|
Count bytes rather than characters.
|
|
|
|
.It Fl s
|
|
|
|
If a line contains spaces, break
|
2015-03-13 18:47:41 -04:00
|
|
|
at the last space within width.
|
|
|
|
.It Fl w Ar num | Fl Ns Ar num
|
2015-01-25 15:22:17 -05:00
|
|
|
Break at
|
2015-03-13 18:47:41 -04:00
|
|
|
.Ar num
|
2020-03-01 17:37:31 -05:00
|
|
|
characters.
|
|
|
|
The default is 80.
|
2015-01-25 15:22:17 -05:00
|
|
|
.El
|
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
2015-03-27 12:22:48 -04:00
|
|
|
.St -p1003.1-2013
|
2015-01-25 15:22:17 -05:00
|
|
|
specification.
|
|
|
|
.Pp
|
2015-03-13 18:47:41 -04:00
|
|
|
The
|
|
|
|
.Op Fl Ns Ar num
|
2015-03-05 03:15:23 -05:00
|
|
|
syntax is an extension to that specification.
|