xtproduct
Section: User Commands (1)
Updated: 2002-10-26
Index
Return to Main Contents
NAME
xtproduct - cross product operation
SYNOPSIS
xtproduct -m reference filename -f attribute(s)
[-i INPUT] [-o OUTPUT] [-z] [-t]
DESCRIPTION
xtproduct pairs up all records by joining the attribute -f on all lines in the master file with the input file. The resulting number of records is equal to the product of the number of records in the input and reference file.
PARAMETERS
- -m master filename
-
a reference file name
- -f attribute(s)
-
attribute(s) in the reference file to join.
OPTIONS
- -i input filename
-
if a suffix of the filename is '.gz', the command acts as a filter, extracting the compressed file for processing. The command will read the file as standard input when "-i" is not specified.
- -o output filename
-
if a suffix of the filename is '.gz', the command automatically returns the output data in zip archive. When "-o" is not specified, the result will sent to standard output.
- -z zip archive
-
compress the standard output to zip archive. When the option "-o" is not given and "-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 365
A00004 20020415 4349
A00004 20020625 5268
A00004 20020810 1805
A00004 20021016 612
A00005 20020810 4554
A00005 20020923 491
A00005 20021016 3410
]]></body>
Master file -dat.xt:
<body><![CDATA[
aa
bb
cc
]]></body
Example 1. Join the code from the reference file to the transaction file.
e.g. xtproduct -m ref.xt -f Code -i dat.xt -o rsl.xt
Output file -rsl.xt
-
<body><![CDATA[
A00004 20020214 365 aa
A00004 20020214 365 bb
A00004 20020214 365 cc
A00004 20020415 4349 aa
A00004 20020415 4349 bb
A00004 20020415 4349 cc
A00004 20020625 5268 aa
A00004 20020625 5268 bb
A00004 20020625 5268 cc
DIAGNOSTICS
Unlike xtjoin and xtnjoin, a common key attribute is not required for the join. Make sure the attribute to be joined in the reference does not exist in the input file.
SEE ALSO
xtjoin(1),
xtnjoin(1)
For complete documentation and tutorial of xtproduct and other commands, please visit
http://musashien.sourceforge.net
BUG REPORT
If you find a bug in xtproduct, 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 language.
AUTHORS
Yukinobu Hamuro, Naoki Katoh, Katsutoshi Yada, Stephane Cheung
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- PARAMETERS
-
- OPTIONS
-
- USAGE
-
- DIAGNOSTICS
-
- SEE ALSO
-
- BUG REPORT
-
- AUTHORS
-
This document was created by
man2html,
using the manual pages.
Time: 22:43:55 GMT, June 24, 2003