[Previous] [Next] [Up] [Top] [Edit]

NAME

sorttable - sort a starbase data table on specified columns.

SYNOPSYS

        sorttable [options] < table [keycolumn[:flags]] [keycolumn[:flags]] ...

DESCRIPTION

sorttable uses the unix sort program to sort a starbase data table.

A pair of lines is compared as follows: if any key fields have been specified, sort compares each pair of fields, in the order specified on the command line, according to the associated ordering options, until a difference is found or no fields are left.

If any of the program options Mbdfhinr are given but no key fields are specified, sort compares the entire lines according to the global options.

OPTIONS

Program Options

Sort Options

COLUMN FLAGS

Any of the above sort options may be supplied for specific columns by suffixing the column with a sort flag. Sort flags are introduced by the colon character (":"). Several flags may be given. The flags affect only that column.

In addition a specific subset of characters in a key column may be selected with the column range modifier.

To sort file on column XXX characters 3 through 5 inclusive.

        sorttable XXX+3-5 file

EXAMPLES

Sort a table by Object name
        john@panic: sorttable < catalog.tab Object > sorted.tab

Sort a table by RA and Dec

        john@panic: sorttable -h < catalog.tab RA Dec > sorted.tab

Sort a table by Object name and then RA position

        john@panic: sorttable < catalog.tab Object -h RA > sorted.tab

SEE ALSO



[Previous] [Next] [Up] [Top] [Edit]