.so tmac.ilib .TH DELAM 1 "The University of Arizona \- 8/15/84" .SH NAME delam \- delaminate a file using column positions .SH SYNOPSIS \f3delam\fP fieldlist {infile | \-} {outputfile | \-}... .SH DESCRIPTION \fIDelam\fR delaminates an input file into several output files according to the fields specified by \f3fieldlist\fR. \fIDelam\fR reads \f3infile\fR and writes the fields in each line to the corresponding output files as individual lines. If no data occurs in the specified position for a given input line an empty output line is written. This insures that all output files contain the same number of lines as the input file. .PP If `\-' is used for \f3infile\fR, the standard input is read. If `\-' is used as an output file name, the corresponding field is written to the standard output. .PP The fields are defined by \f3fieldlist\fR, which is a list of field specifications, separated by commas, colons, or semicolons, of the following form: .DS .ft I n \fRthe character in column \fIn n\-m \fRthe characters in columns \fIn\fR through \fIm n+m m \fRcharacters beginning at column \fIn .ft R .DE where the columns in a line are numbered from 1 to the length of the line. .PP The use of \fIdelam\fR is illustrated by the following examples. .DS delam 1\-10,5 foo x y .DE reads file \fIfoo\fR and writes characters 1 through 10 to file \fIx\fR and character 5 to file \fIy\fR. .DS delam 10+5:1\-10:1\-10:80 \- middle left1 left2 end .DE reads the standard input and writes characters 10 through 14 to \fImiddle\fR, 1 through 10 to \fIleft1\fR and \fIleft2\fR, and character 80 to \fIend\fR. .DS delam 1\-80;1\-80 \- \- \- .DE copies the standard input to the standard output, replicating the first eighty columns of each line twice. .SH NOTES The functionality of the Software Tools \fIdelam\fR has been divided. The Icon version of \fIdelam\fR uses an extended fieldlist syntax. .SH SEE ALSO lam(1), delamc(1) .LP .St .SH AUTHOR Thomas R. Hicks