qsgrep man page

qsgrep — prints matching patterns within a file.

Synopsis

qsgrep -e <pattern> -o <sub string> [<path>]

Description

qsgrep is a simple tool to search patterns within files. It uses regular expressions to find patterns and prints the submatches within a pre-defined format string.

Options

-e <pattern>
Specifes the search pattern.
-o <string>
Defines the output string where $0-$9 are substituted by the submatches of the regular expression.
<path>
Defines the input file to process. qsgrep reads from from standard input if this parameter is omitted.

Example

Shows the IP addresses of clients causing mod_qos(031) messages):

qsgrep -e 'mod_qos\(031\).*, c=([a-zA-Z0-9:.]*)' -o 'ip=$1' error_log

See Also

qsexec(1), qsfilter2(1), qsgeo(1), qshead(1), qslog(1), qslogger(1), qspng(1), qsrotate(1), qssign(1), qstail(1)

Author

Pascal Buchbinder, http://mod-qos.sourceforge.net/

Referenced By

qsexec(1), qsfilter2(1), qsgeo(1), qshead(1), qslog(1), qslogger(1), qspng(1), qsrotate(1), qssign(1), qstail(1).

November 2016 mod_qos utilities 11.36 qsgrep man page