xtduprec
Section: User Commands (1)
Updated: 2002-10-26
Index
Return to Main Contents
NAME
xtduprec - duplication of a line
SYNOPSIS
xtduprec -f numeric attribute
[-i INPUT] [-o OUTPUT] [-z] [-t]
DESCRIPTION
Duplicates the record based on the numerical value of the attribute at option -f. Instead of counting the number of lines, this command repulicates records.
PARAMETERS
- -f numerical attribute
-
numerical attribute for which determines the number of copies to be made
FILE 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 1 365
A00004 20020415 5 4349
A00004 20020625 3 5268
A00004 20020810 2 1805
A00004 20021014 2 612
]]></body>
Example 1. Duplicate each record based on the total quantity or each purchase.
e.g. xtduprec -f quantity -i dat.xt -o rsl.xt
Output file -rsl.xt
-
<body><![CDATA[
A00004 20020214 1 365
A00004 20020415 5 4349
A00004 20020415 5 4349
A00004 20020415 5 4349
A00004 20020415 5 4349
A00004 20020415 5 4349
A00004 20020625 3 5268
A00004 20020625 3 5268
A00004 20020625 3 5268
A00004 20020810 2 1805
A00004 20020810 2 1805
A00004 20021014 2 612
A00004 20021014 2 612
]]></body>
DIAGNOSTICS
Make sure the attribute defined in option -f is a numerial value or the record will be discarded.
SEE ALSO
xtcount(1)
For complete documentation and tutorial of xtduprec and other commands, please visit
http://musashien.sourceforge.net.
BUG REPORT
If you find a bug in xtduprec, 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
-
- FILE OPTIONS
-
- USAGE
-
- DIAGNOSTICS
-
- SEE ALSO
-
- BUG REPORT
-
- AUTHORS
-
This document was created by
man2html,
using the manual pages.
Time: 22:43:54 GMT, June 24, 2003