qsgrep(1)

qsgrep1

Prints matching patterns within a file.

Usage

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

Overview

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.

Examples

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

Releases

6 releases since Debian 7 (Wheezy); the text changed 4 times.

  1. 7
  2. 8
  3. 9
  4. 10
  5. 11–12

Author

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

From libapache2-mod-qos 11.63-1+b2 in Debian 12 (Bookworm). Parsed by carta from the page's man source.