xtselstr
Section: User Commands (1)
Updated: 2002-10-26
Index
Return to Main Contents
NAME
xtselstr - selection by string matching
SYNOPSIS
xtselstr -f attribute(s) -v search strings
[-k key attribute] [-F] [-R] [-r] [-u EXCEPION OUTPUT] [-q] [-i INPUT] [-o OUTPUT] [-z] [-t] [-T WORKFILE DIRECTORY]
DESCRIPTION
Selects the record where the search string matches the corresponding attribute defined in -f.
Multiple character strings can be defined delimited by comma. Yet, xtcommon is preferred when there are too many strings.
Searching is done by storing a set of character strings in a hash table.
PARAMETERS
- -k key attribute(s)
-
key attribute
- -f attribute(s)
-
a list of attributes for which you want to search
- -v search string(s)
-
character strings to search on the attribute(s) defined at -f argument
- -R 'AND' condtion between records
-
in the key-based selection, selection is done only if all records corresponding
to the same key satisfy the condition.
- -F 'AND' condition between attributes
-
When more than one attribute is specified by -f, the record is
selected (or deleted) only if every attribute contains the matched string.
- -r reverse selection
-
reverse the selection for records by removing records that matches.
- -q sequential processing
-
when this option is used with the -k parameter, the command processes the input
data in original sequence of the records, instead of sorting by the key attribut
e -k.
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.
- -u exception output filename
-
output filename for the data unmatched to the condition specified.
- -T temp file directory
-
the directory name for temporary files used in this command.
- -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[
A00014 shampoo
A00014 conditioner
A00014 toothpaste
A00014 toothbrush
A00014 laundrydetergent
A00014 softener
A00015 shampoo
A00015 soap
A00015 pen
A00015 pencil
A00015 eraser
A00015 softener
A00016 soap
A00016 laundrydetergent
A00017 shampoo
A00017 toothbrush
A00017 softener
]></body>
Example 1. Select transactions with shampoo and toothbrush.
e.g. xtselstr -f Category4 -v shampoo,toothbrush -i dat.xt -o rsl.xt
Output file -rsl.xt
-
<body><![CDATA[
A00014 shampoo
A00014 toothbrush
A00015 shampoo
A00017 shampoo
A00017 toothbrush
]></body>
Example 2. Select transactions with shampoo and toothbrush.
e.g. xtselstr -k CustomerID -f Category4 -v shampoo,toothbrush -i dat.xt -o rsl.xt
Output file -rsl.xt
-
<body><![CDATA[
A00014 shampoo
A00014 conditioner
A00014 toothpaste
A00014 toothbrush
A00014 laundrydetergent
A00014 softener
A00015 shampoo
A00015 soap
A00015 pen
A00015 pencil
A00015 eraser
A00015 softener
A00017 shampoo
A00017 toothbrush
A00017 softener
]></body>
SEE ALSO
xtsel(1),
xtcommon(1)
For complete documentation and tutorial of xtselstr and other commands, please visi
t
http://musashien.sourceforge.net.
BUG REPORT
If you find a bug in xtselstr, 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