xtsubstr(1)

NAME
xtsubstr - cutting substring as new field

SYNOPSIS
xtsubstr -f attribute -R range list [-A] [-i input filename] [-o output filename] [-z] [-t]

DESCRIPTION
 For an attribute specified by -f, this command extracts a substring of the attribute specified by -R, and outputs it as a new attribute (or replaces the original attribute value with it).

PARAMETERS

-f attribute
    an attribute from which substring is extracted (you cannot specify more than one attribute)

-R range list
    specify the start and the last position of the specified attribute to be extracted

-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.

OPTIONS

-A  create a new attribute.: If -A is not specified, replacement is done.

-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

   xtsubstr -fdate:year -R 1_4 -i dat.xt -o rsl.xt

   xtsubstr -fdate:year_dairy -R 1_4,7_8 -i dat.xt -o rsl.xt

   xtsubstr -fdate:year -R 1_4 -A -i dat.xt -o rsl.xt

   xtsubstr -fdate:month_dairy -R 5_MAX -A -i dat.xt -o rsl.xt

SEE ALSO
xtsel(1), xtuniq(1)

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

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

AUTHORS
Yukinobu Hamuro,Naoki Katoh,Katsutoshi Yada