xref: /dragonfly/usr.bin/fold/fold.1 (revision dc71b7ab)
1.\" Copyright (c) 1980, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. Neither the name of the University nor the names of its contributors
13.\"    may be used to endorse or promote products derived from this software
14.\"    without specific prior written permission.
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\"	@(#)fold.1	8.1 (Berkeley) 6/6/93
29.\" $FreeBSD: src/usr.bin/fold/fold.1,v 1.3.2.6 2002/07/11 01:01:44 tjr Exp $
30.\" $DragonFly: src/usr.bin/fold/fold.1,v 1.2 2003/06/17 04:29:26 dillon Exp $
31.\"
32.Dd April 17, 2002
33.Dt FOLD 1
34.Os
35.Sh NAME
36.Nm fold
37.Nd "fold long lines for finite width output device"
38.Sh SYNOPSIS
39.Nm
40.Op Fl bs
41.Op Fl w Ar width
42.Op Ar
43.Sh DESCRIPTION
44The
45.Nm
46utility is a filter which folds the contents of the specified files,
47or the standard input if no files are specified,
48breaking the lines to have a maximum of 80 columns.
49.Pp
50The options are as follows:
51.Bl -tag -width indent
52.It Fl b
53Count
54.Ar width
55in bytes rather than column positions.
56.It Fl s
57Fold line after the last blank character within the first
58.Ar width
59column positions (or bytes).
60.It Fl w Ar width
61Specify a line width to use instead of the default 80 columns.
62.Ar Width
63should be a multiple of 8 if tabs are present, or the tabs should
64be expanded using
65.Xr expand 1
66before using
67.Nm .
68.El
69.Sh SEE ALSO
70.Xr expand 1
71.Sh STANDARDS
72The
73.Nm
74utility conforms to
75.St -p1003.1-2001 .
76.Sh BUGS
77If underlining is present it may be messed up by folding.
78