1.\" Copyright (c) 1980, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)expand.1 6.6 (Berkeley) 03/14/91 7.\" 8.Vx 9.Vx 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 19.Oo 20.Op Fl Ar tabstop 21.Op Fl Ar tab1,tab2,...,tabn 22.Oo 23.Ar 24.Nm unexpand 25.Op Fl a 26.Ar 27.Sh DESCRIPTION 28.Nm Expand 29processes the named files or the standard input writing 30the standard output with tabs changed into blanks. 31Backspace characters are preserved into the output and decrement 32the column count for tab calculations. 33.Nm Expand 34is useful for pre-processing character files 35(before sorting, looking at specific columns, etc.) that 36contain tabs. 37.Pp 38If a single 39.Ar tabstop 40argument is given, then tabs are set 41.Ar tabstop 42spaces apart instead of the default 8. 43If multiple tabstops are given then the tabs are set at those 44specific columns. 45.Pp 46.Nm Unexpand 47puts tabs back into the data from the standard input or the named 48files and writes the result on the standard output. 49.Pp 50Option (with 51.Nm unexpand 52only): 53.Tw Ds 54.Tp Fl a 55By default, only leading blanks and tabs 56are reconverted to maximal strings of tabs. If the 57.Fl a 58option is given, then tabs are inserted whenever they would compress the 59resultant file by replacing two or more characters. 60.Tp 61.Sh HISTORY 62.Nm Expand 63appeared in 3 BSD. 64