LEXTRACT.EXE is a utility for extracting records from
an ASCII flat file based on a search string. Only those records
in the input file which have a match with the search string are
printed in the output file. If a starting column is specified,
a match means that the search string is identical to the string
starting in the specified column (number of characters from the
start) of each record.
If a starting column is not specified, then a match means the
search string can be found anywhere in the record. The comparisons
are by default case sensitive, but can be specified to be case
insensitive.
Records may either have a fixed length, or may be newline delimited.
If a fixed length is not specified, then the records are assumed
to be newline delimited.
LEXTRACT.EXE infile -sXXX -cXX -i -rXX -oOutfile -? where infile = Name of input ascii flat file if omitted, data is taken from stdin -sXXX = XXX is the search string -cXX = XX is the column to look for the search string, if omitted, searches the entire record (line) -i = ignore case of search string -rXX = record length, including terminating newline if present if omitted, assumes lines are terminated with newlines Outfile = Name of ascii output file if omitted, output is written to stdout -? Prints Syntax, then exits.
lextract test1.txt -saaa -c4 -otest1out.txt lextract test1.txt -saaa -c4 -i -otestiout.txt