Searching Files Using QGREP

To locate text within a file or group of files, use QGREP.EXE. The following line shows QGREP command-line syntax:

qgrep [-?BELOXlnzvxy] [-e string] [-f file] [-i file] [strings] [files]
 
-?
Print command-line syntax.
-B
Match pattern at beginning of line.
-E
Match pattern at end of line.
-L
Treat search strings literally.
-O
Print seek offset before each matching line.
-X
Treat search strings as regular expressions.
-l
Print only the filename if the file contains a match.
-n
Print line numbers before each matching line.
-z
Print matching lines in MSC error message format.
-v
Print only lines that do not contain a match.
-x
Print lines that match exactly.
-y
Treat upper- and lower-case as equivalent.
-e string
Treat the next argument as a literal search string.
-f file
Read search strings from file.
-i file
Read file list from file.
strings
The search string(s). White spaces separate search strings, unless the argument is prefixed with -e.
files
The file(s) to search, which can include wildcard characters (* and ?).

For example, the following command finds either arg1 or arg2 in FileName:

qgrep "arg1 arg2" FileName

The following command finds arg1 arg2 in FileName:

qgrep -e "arg1 arg2" FileName