xtsetchr
Section: User Commands (1)
Updated: 2002-10-26
Index
Return to Main Contents
NAME
xtsetchr - add a string as new field
SYNOPSIS
xtsetchr -v value -a new attribute
[-i INPUT] [-o OUTPUT] [-z] [-t]
DESCRIPTION
This command adds a new attribute defined by the user to the last column of
the data set for all records. The value can be either numeric or character without spaces in between.
PARAMETERS
- -v value
-
string to add. e.g. Current date, name, location, etc.
- -a new attribute
-
define the name for the new attribute
OPTIONS
- -i input filename
-
if a suffix of the filename is '.gz', the command acts as a filter, extracting t
he compressed file for processing. The command will read the file as standard in
put when "-i" is not specified.
- -o output filename
-
if a suffix of the filename is '.gz', the command automatically returns the outp
ut data in zip archive. When "-o" is not specified, the result will sent to stan
dard output.
- -z zip archive
-
compress the standard output to zip archive. When the option "-o" is not given a
nd "-z" is specified, the output will be compressed as zip archive.
- -t plain text
-
xtagg treats the input and output data as plain text format.
USAGE
Input file - dat.xt:
<body><![CDATA[
A00004 20020214 1 365
A00004 20020415 5 4349
A00004 20020625 3 5268
A00004 20020810 2 1805
A00004 20021014 2 612
A00004 20021016 11 3410
A00005 20020918 1 4554
A00005 20020923 1 491
]]></body>
Example 1. Add the current date to all records.
The addition of current date allows us to calcuate the number of days since the user's last visit.
e.g. xtsetchr -v 20030621 -a current_date -i dat.xt -o rsl.xt
Output file -rsl.xt
-
<body><![CDATA[
A00004 20020214 1 365 20030621
A00004 20020415 5 4349 20030621
A00004 20020625 3 5268 20030621
A00004 20020810 2 1805 20030621
A00004 20021014 2 612 20030621
A00004 20021016 11 3410 20030621
A00005 20020918 1 4554 20030621
A00005 20020923 1 491 20030621
]]></body>
SEE ALSO
For complete documentation and tutorial of xtsetchr and other commands, please vi
sit
http://musashien.sourceforge.net
BUG REPORT
If you find a bug in xtsetchr, please send an electronic mail to
musashi@adm.osaka-sandai.ac.jp.
Before sending a bug report, please verify that you have the lastest version of
MUSASHI.
Read this manual carefully to ensure the error is not caused by a quirk in the l
anguage.
AUTHORS
Yukinobu Hamuro, Naoki Katoh, Katsutoshi Yada, Stephane Cheung
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- PARAMETERS
-
- OPTIONS
-
- USAGE
-
- SEE ALSO
-
- BUG REPORT
-
- AUTHORS
-
This document was created by
man2html,
using the manual pages.
Time: 22:43:55 GMT, June 24, 2003