This HTML automatically generated with rman for NEMO
Table of Contents

Name

gettab - extract real table from a table

Synopsis

gettab in=in_table out=out_table [parameter=value]

Description

gettab extracts numeric portions of a table. A table can either be processed in free format (in which case only column numbers need to be given), or in fixed format (in which case the starting position and format specification need to be supplied).

Parameters

The following parameters are recognized in any order if the keyword is also given:
in=in_tab
Input (ascii) table, no default.
out=out_tab
Output (ascii) table, no default.
colnr=c1,c2,...cN
Input column numbers to extract. Column numbers only need to be supplied in the free format case. colpos and colfmt are then ignored. Column numbers are numbered 1 through N, columns are separated by whitespace or a comma. If a 0 is specified, the return value is filled in with the line number from the input file, 1 being the first. Default: none.
colpos=i1,i2,...iL
Input column positions to extract in fixed format case. Column positions can be numbered 1 through the line length. This keyword is equivalent to the FITS TBCOL keyword. If a 0 is specified, the returned value is filled in with the line number from the input file, 1 being the first. Default: none.
colfmt=f1, f2...fL
Input format for fixed fmt case. Format specification can be in standard C printf format, though a limited number of fortran format specifications are also understood (Fn.m, Gn.m) This keyword is equivalent to the FITS TFORM keyword. Default: none.
fmt=out_fmt
Output format. All columns are currently printed using this format. [Default: %g].
nmax=max_row
Maximum number of rows (data) to read. In reality this is a local buffer size, and tables with more than max_row can be comfortably read. [Default: 1000]

Example

The following two examples extracts column 3 and 4 in free format, the first one using gettab, the second one using awk:
    1% gettab in_tab out_tab 1,2
    2% awk ’{print $1,$2}’ < in_tab > out_tab

See Also

awk(1) , table(3NEMO)

Files


~/src/kernel/tab    gettab.c

AuthorPeter Teuben Update History
06-Aug-92    V1.0 Created    PJT


Table of Contents