xtnumber(1)

NAME
xtnumber - put the sequential number

SYNOPSIS
xtnumber [-k list of attributes] [-s a list of atributes to be rearranged[%{n|r}]] [-S start number] [-I interval] [-B] -a name of a new attribute [-q] [-i input filename] [-o output filename] [-z] [-t] [-T directory of work file]

DESCRIPTION
Letting the key of an input file be defined by the attributes specified by -k, the command sequentially numbers the lines which have the same key value.

PARAMETERS

-k list of attributes
    a list of attributes which determines the key of an input file (when -k is omitted, all lines are assumed to take the same key value).

-s a list of atributes to be rearranged
    this determines the ordering of records for those having the same key value

-S start number
    start number (default value is 1).

-I interval
    interval of sequential numbering (default value is 1).

-a name of a new attribute
    name of a new attribute

-i input filename
    Specify the input filename for this command. If a suffix of the filename is '.gz', the command automatically unzip it beforehand. When this parameter is omitted, standard input (usulally keyboard) is regarded as input file.

-o output filename
    Specify the output filename for this command. If a suffix of the filename is '.gz', the command automatically zip the output data. When this parameter is omitted, standard output (usulally display) is regarded as output file.

-T directory of work file
    Specify the directory name for temporal files used in this command.

OPTIONS

-B  assign sequential number to each distinct key: sequential numbering is done for distinct key values. If -S is omitted, sequential numbering is done for lines with the same key value.

-q  the transaction of sequential: When this option specified with -k parameter, the command process the input data following the original sequence of the lines, instead of processing after sorting the field specified by -k parameter.

-z  compress the standard output by gz: When -o is omitted and this option is specified, the command output the result zipped.

-t  plain text: When this option is specified, the command treat the input and output data as plain text format.

EXAMPLE

 xtnumber -k date -a sequential number -i dat.xt -o rsl.xt

 xtnumber -a sequential number -i dat.xt -o rsl.xt

 xtnumber -k date -a sequential number -B -i dat.xt -o rsl.xt

 xtnumber -k date -a sequential number -S 10 -I 5 -i dat.xt -o rsl.xt

SEE ALSO

WEB PAGE
http://musashi.adm.osaka-sandai.ac.jp

BUG REPORT
musashi@adm.osaka-sandai.ac.jp

AUTHORS
Yukinobu Hamuro,Naoki Katoh,Katsutoshi Yada