Select Columns from an Input File

p3-extract [options] col1 col2 ... colN

This script extracts the specified columns from a tab-delimited file.


The positional parameters are the numbers or names of the columns to include in the output. The column numbers are 1-based, and the column names are taken from the header record of the input file.

The standard input may be overridden by the command-line options given in Input Options.

The following additional options are supported.


Output all the columns. This simply copies the file.


If specified, the file is presumed to have no headers.