2015-10-08 15:15:08 +00:00
|
|
|
.Dd 2015-10-08
|
2015-01-31 13:20:02 +00:00
|
|
|
.Dt FOLD 1
|
2015-01-31 19:37:03 +00:00
|
|
|
.Os sbase
|
2015-01-25 20:22:17 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm fold
|
|
|
|
.Nd wrap lines to width
|
|
|
|
.Sh SYNOPSIS
|
2015-01-30 20:17:58 +00:00
|
|
|
.Nm
|
2015-01-25 20:22:17 +00:00
|
|
|
.Op Fl bs
|
2015-03-13 22:47:41 +00:00
|
|
|
.Op Fl w Ar num | Fl Ns Ar num
|
2015-01-25 20:22:17 +00: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 22:47:41 +00:00
|
|
|
at the last space within width.
|
|
|
|
.It Fl w Ar num | Fl Ns Ar num
|
2015-01-25 20:22:17 +00:00
|
|
|
Break at
|
2015-03-13 22:47:41 +00:00
|
|
|
.Ar num
|
2020-03-01 22:37:31 +00:00
|
|
|
characters.
|
|
|
|
The default is 80.
|
2015-01-25 20:22:17 +00:00
|
|
|
.El
|
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
2015-03-27 16:22:48 +00:00
|
|
|
.St -p1003.1-2013
|
2015-01-25 20:22:17 +00:00
|
|
|
specification.
|
|
|
|
.Pp
|
2015-03-13 22:47:41 +00:00
|
|
|
The
|
|
|
|
.Op Fl Ns Ar num
|
2015-03-05 08:15:23 +00:00
|
|
|
syntax is an extension to that specification.
|