Last updated Fri Nov 19 15:23:33 1999



1. columns

Convention for specifying column numbers on command line

2. DESCRIPTION

This manual page describes the syntax for specifying column numbers on the command line of some utilities.

Normally, columns are specified by their number as they appear in input files, starting from one. Each column number must be separated by a comma, and no white spaces must appear in the list. For example:

1,2,5,4
specifies columns 1, 2, 5 and 4. If the utility outputs data from these columns as they appear in the list, this example would also correspond to a rearranging of columns.

A comma separated field can also define a range instead of specifying the number of a column. The syntax is similar to ranges in Matlab. For example:

3:2:12
is equivalent to 3,5,7,9,11. However, ranges specified this way must contain three values (in contradiction with Matlab where only two values are also accepted). If the step value is negative, columns will be taken in the reverse order. For example:
12:-2:3
is equivalent to 12,10,8,6,4. An increasing range with a step value of one can also be specified like
5-7
which is equivalent to 5,6,7.

These formats can be mixed. For example:

5,2,20:-2:16,1-3,5,6:3:12
which is equivalent to 5,2,20,18,16,1,2,3,5,6,9,12.

3. AUTHOR

Manual page written by Pierre Jaccard, Geophysical Institute, University of Bergen, 1999.


Back to the top documentation Index of GFI Extensions