Next Previous Up Contents
Next: Output Modes
Up: Table Pipelines
Previous: Specifying a Single Column

6.3 Specifying a List of Columns

If an argument is specified in the help text for a command with the symbol <colid-list> it means you must give a string which identifies a list of zero, one or more of the existing columns in a table. The string you specify is a separated into separate tokens by whitespace, which means that you will normally have to surround it in single or double quotes to ensure that it is treated as a single argument and not several of them.

Each token in the <colid-list> string may be one of the following:

Single Column Identifier
The identifier for a single column, as described in Section 6.2: one of <name>, <index>, $<index>, ucd$<ucd-expr> or utype$<utype-expr>.
Wildcard Expression
You can use a simple form of wildcard expression which expands to any columns in the table whose names match the pattern. Currently, the only special character is an asterisk '*' which matches any sequence of characters. To match an unknown sequence at the start or end of the string an asterisk must be given explicitly. Other than that, matching is usually case insensitive. The order of the expanded list is the same as the order in which the columns appear in the table.

Thus "col*" will match columns named col1, Column2 and COL_1024, but not decOld. "*MAG*" will match columns named magnitude, ABS_MAG_U and JMAG. "*" on its own expands to a list of all the columns of the table in order.

Column Range
You can specify a range of columns in order using a token of the form <first-colid>-<last-colid>, where the syntax for <first-colid> and <last-colid> is a Single Column Identifier as above (as long as it doesn't contain a "-" character). The range is inclusive, so the first and last column are both included. The <first-colid> or <last-colid> part (but not both) may be omitted, to indicate all the columns from the start or all the columns to the end, respectively.

So "RA-PARALLAX" means all the columns starting with the one named RA and ending with the one named PARALLAX (inclusive); "1-100" or "$1-$100" means the first hundred columns in the table; "101-" or "$101-" means all the columns apart from the first hundred, "PARALLAX-" means PARALLAX and all subsequent columns, etc.

Specifying a list which contains a given column more than once is not usually an error, but what effect it has depends on the function you are executing.


Next Previous Up Contents
Next: Output Modes
Up: Table Pipelines
Previous: Specifying a Single Column

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk