Next: , Previous: Sortn, Up: Data Manipulation Commands

29.2.2 extract — Extract Columns of Data from a File

extract extracts columns of data from a file and places them in another file. This program is similar to the Unix program, cut, and was primarily written to provide that functionality for VMS. The operation is specified through the command line, or if blank, the operations are specified interactively.

The command line syntax is

     extract input-file output-file col1 size1 [col2 size2 ...]

coln are the positions of data, sizen is the number of characters for each data entry. The output file consists of the columns concatenated together in the order specified with no blanks in between. If input-file is specified as `-', then standard input is used. If output-file is specified as `-', then standard output is used.