Reference

tagextract(1)

extract matching records from a tag file

NAME

tagextract - extract matching records from a tag file

SYNOPSIS

tagextract [-h] [-v] [-n number] [-m [fieldname op [fieldvalue]] [infile] [outfile]

DESCRIPTION

tagextract processes a tag stream on its standard input, looking for records which match the conditions required by the fieldname, operator and usually fieldvalue arguments.

OPTIONS

-h

Disables normal header processing. If this is not present then the first record is assumed to be a header, and will always be output intact as the new header record.

-v

Invert the sense of matching, to output all the lines which do NOT match the conditions.

-d

Print debugging information to stderr

-n

Output the record which is this number of records into the tag file later versions may expand this to select a range. Record 0 is the header.

-m fieldname op [fieldvalue]

Output records if they match the condition test specified by op

The test operators are

-eq

String equals

==

Numerically equal (like Perl)

-gt

Numerically greater than (unlike Perl)

-lt

Numerically less than (unlike Perl)

-contains

Contains (note currently case sensitive !!!)

-exists

True if the field exists in the record - does not take a value

-before

True if the field with the given value has not yet been reached

-earlier

The field being tested must contain a date in ISO format - true if the field value is earlier than the value given on the command line.

-later

True if a date in ISO format is later than the given date.

EXAMPLES

The following will extract all the records where the date is later than the first of September 1994
tagextract -m Date -later 1994-09-01

SEE ALSO

tagprogs(1), tag(5)

AUTHOR

John Lines ([email protected])