Commit | Line | Data |
---|---|---|
297a0a40 KB |
1 | .\" Copyright (c) 1980 The Regents of the University of California. |
2 | .\" All rights reserved. | |
5451a149 | 3 | .\" |
297a0a40 KB |
4 | .\" Redistribution and use in source and binary forms are permitted |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
15 | .\" | |
16 | .\" @(#)expand.1 6.3 (Berkeley) %G% | |
5451a149 | 17 | .\" |
24fbc0bd | 18 | .TH EXPAND 1 "" |
5451a149 KM |
19 | .UC 4 |
20 | .SH NAME | |
21 | expand, unexpand \- expand tabs to spaces, and vice versa | |
22 | .SH SYNOPSIS | |
23 | .B expand | |
24 | [ | |
25 | \-tabstop | |
26 | ] [ | |
27 | \-tab1,tab2,...,tabn | |
28 | ] [ | |
29 | file ... | |
30 | ] | |
31 | .br | |
32 | .B unexpand | |
33 | [ | |
34 | .B \-a | |
35 | ] [ | |
36 | file ... | |
37 | ] | |
38 | .SH DESCRIPTION | |
39 | .I Expand | |
40 | processes the named files or the standard input writing | |
41 | the standard output with tabs changed into blanks. | |
42 | Backspace characters are preserved into the output and decrement | |
43 | the column count for tab calculations. | |
44 | .I Expand | |
45 | is useful for pre-processing character files | |
46 | (before sorting, looking at specific columns, etc.) that | |
47 | contain tabs. | |
48 | .PP | |
49 | If a single | |
50 | .I tabstop | |
bfe02f44 | 51 | argument is given, then tabs are set |
5451a149 KM |
52 | .I tabstop |
53 | spaces apart instead of the default 8. | |
54 | If multiple tabstops are given then the tabs are set at those | |
55 | specific columns. | |
56 | .PP | |
57 | .I Unexpand | |
58 | puts tabs back into the data from the standard input or the named | |
59 | files and writes the result on the standard output. | |
bfe02f44 | 60 | By default, only leading blanks and tabs |
5451a149 KM |
61 | are reconverted to maximal strings of tabs. If the |
62 | .B \-a | |
63 | option is given, then tabs are inserted whenever they would compress the | |
64 | resultant file by replacing two or more characters. |