Commit | Line | Data |
---|---|---|
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 | .\" |
ee9b0a0a CL |
8 | .Vx |
9 | .Vx | |
f35cac8e CL |
10 | .Dd |
11 | .Dt EXPAND 1 | |
12 | .Os BSD 4 | |
13 | .Sh NAME | |
14 | .Nm expand , | |
15 | .Nm unexpand | |
16 | .Nd expand tabs to spaces, and vice versa | |
17 | .Sh SYNOPSIS | |
18 | .Nm expand | |
5325ced3 CL |
19 | .Oo |
20 | .Op Fl Ar tabstop | |
21 | .Op Fl Ar tab1,tab2,...,tabn | |
22 | .Oo | |
f35cac8e CL |
23 | .Ar |
24 | .Nm unexpand | |
25 | .Op Fl a | |
26 | .Ar | |
27 | .Sh DESCRIPTION | |
28 | .Nm Expand | |
5451a149 KM |
29 | processes the named files or the standard input writing |
30 | the standard output with tabs changed into blanks. | |
31 | Backspace characters are preserved into the output and decrement | |
32 | the column count for tab calculations. | |
f35cac8e | 33 | .Nm Expand |
5451a149 KM |
34 | is useful for pre-processing character files |
35 | (before sorting, looking at specific columns, etc.) that | |
36 | contain tabs. | |
f35cac8e | 37 | .Pp |
5451a149 | 38 | If a single |
f35cac8e | 39 | .Ar tabstop |
bfe02f44 | 40 | argument is given, then tabs are set |
f35cac8e | 41 | .Ar tabstop |
5451a149 KM |
42 | spaces apart instead of the default 8. |
43 | If multiple tabstops are given then the tabs are set at those | |
44 | specific columns. | |
f35cac8e CL |
45 | .Pp |
46 | .Nm Unexpand | |
5451a149 KM |
47 | puts tabs back into the data from the standard input or the named |
48 | files and writes the result on the standard output. | |
f35cac8e CL |
49 | .Pp |
50 | Option (with | |
51 | .Nm unexpand | |
52 | only): | |
5325ced3 | 53 | .Tw Ds |
f35cac8e | 54 | .Tp Fl a |
bfe02f44 | 55 | By default, only leading blanks and tabs |
5451a149 | 56 | are reconverted to maximal strings of tabs. If the |
f35cac8e | 57 | .Fl a |
5451a149 KM |
58 | option is given, then tabs are inserted whenever they would compress the |
59 | resultant file by replacing two or more characters. | |
f35cac8e CL |
60 | .Tp |
61 | .Sh HISTORY | |
62 | .Nm Expand | |
63 | appeared in 3 BSD. |