add .Vx so tmac.andoc will call tmac.mdoc-old
[unix-history] / usr / src / usr.bin / expand / expand.1
CommitLineData
f35cac8e 1.\" Copyright (c) 1980, 1990 The Regents of the University of California.
297a0a40 2.\" All rights reserved.
5451a149 3.\"
f35cac8e 4.\" %sccs.include.redist.man%
297a0a40 5.\"
d0719240 6.\" @(#)expand.1 6.6 (Berkeley) %G%
5451a149 7.\"
f35cac8e
CL
8.Dd
9.Dt EXPAND 1
10.Os BSD 4
11.Sh NAME
12.Nm expand ,
13.Nm unexpand
14.Nd expand tabs to spaces, and vice versa
15.Sh SYNOPSIS
16.Nm expand
5325ced3
CL
17.Oo
18.Op Fl Ar tabstop
19.Op Fl Ar tab1,tab2,...,tabn
20.Oo
f35cac8e
CL
21.Ar
22.Nm unexpand
23.Op Fl a
24.Ar
25.Sh DESCRIPTION
26.Nm Expand
5451a149
KM
27processes the named files or the standard input writing
28the standard output with tabs changed into blanks.
29Backspace characters are preserved into the output and decrement
30the column count for tab calculations.
f35cac8e 31.Nm Expand
5451a149
KM
32is useful for pre-processing character files
33(before sorting, looking at specific columns, etc.) that
34contain tabs.
f35cac8e 35.Pp
5451a149 36If a single
f35cac8e 37.Ar tabstop
bfe02f44 38argument is given, then tabs are set
f35cac8e 39.Ar tabstop
5451a149
KM
40spaces apart instead of the default 8.
41If multiple tabstops are given then the tabs are set at those
42specific columns.
f35cac8e
CL
43.Pp
44.Nm Unexpand
5451a149
KM
45puts tabs back into the data from the standard input or the named
46files and writes the result on the standard output.
f35cac8e
CL
47.Pp
48Option (with
49.Nm unexpand
50only):
5325ced3 51.Tw Ds
f35cac8e 52.Tp Fl a
bfe02f44 53By default, only leading blanks and tabs
5451a149 54are reconverted to maximal strings of tabs. If the
f35cac8e 55.Fl a
5451a149
KM
56option is given, then tabs are inserted whenever they would compress the
57resultant file by replacing two or more characters.
f35cac8e
CL
58.Tp
59.Sh HISTORY
60.Nm Expand
61appeared in 3 BSD.