Scan Files
All files to be scanned for pattern matches
should
be named after the pattern or pattern input file on the command line.
Any file name prefixed with '@' will be treated as a list file.
Each
line is treated as if it was inserted in the original command line
where
the list file was named. Options may be toggled and new scan
files
or list files named. Leading and trailing blanks and tabs are
ignored.
All lines for which the first non-blank character == '#' are treated as
comment
lines and ignored.
A superset of the DOS wildcards are recognized and may be in either the
path
or filename portion of a file identification specification for file
specifications
on either the QTGrep command line or in list file lines. The
following
modified regular expression operators are recognized in paths and
filename.ext:
(The equivalent Regular Expression is shown in parenthesis)
* == match any character zero or more times (== .*),
? == match any character zero or one time (== .?),
+ == match any character one or more times (== .+),
| == or symbol between equivalent expressions
() parenthesis for bracketing
[] brackets for equivalent position characters
'!' or '^' as 1st character negates
'-' indicates character range
r@s r expression matched only when followed by s expression.
The last full name ending the pattern will be interpreted as a
filename(.ext).
If the pattern ends with an OS path separator character, the filename
pattern,
'*' for OS/2 and U**x style OSs, will be used automatically.
Preceeding
a file specification with '!' will select only those files NOT
MATCHING
the pattern.
QTGrep treats lines with the following form specially in list files:
dependent_file: target_file_1 target_file_2 ...
The date/time stamp for the dependent file, "dependent_file" is
compared
with the date/time stamps for each of the target files listed,
"target_file_1",
"target_file_2", etc. If the date/time stamp for any of the
target
files is newer than that of the dependent file, all target files are
scanned
for matches. Any target file name may incorporate wild card
characters
as described above. In addition, if the 's' option is active,
subdirectories
will be searched for filename matches. Normally QTGrep writes all
output
to the standard output file. In this case, all output is written
to
the dependent file. Any information currently in the dependent
file
is lost. If the date/time stamp for the dependent file is newer
than
the date/time stamp of all target files, no action is taken.
A list file of the form:
dep_file_1: target_file_1
dep_file_2: target_file_2
dep_file_3: target_file_3
.
.
.
will scan only the target files with date/time stamps newer than the
corresponding
dependent file, updating the dependent file.
© Terry D. Boldt 1997-2005
All Rights Reserved
Last Updated: Feb. 03, 2005