s6-portable-utils
Software
www.skarnet.org
The s6-grep program
s6-grep matches its input against a pattern.
Interface
s6-grep [ -F ] [ -c ] [ -n ] [ -q ] [ -v ] pattern
- s6-grep compiles pattern as an
Extended
Regular Expression
- It reads stdin and matches every line against this regexp
- If the line matches, it prints it to stdout
- It exits on EOF with code 0 if one or more lines matched and 1
otherwise.
Options
- -F : pattern is not compiled as an ERE, but is
interpreted as a literal string.
- -c : suppresses normal output; only writes the number of
lines that have matched pattern after EOF is received.
- -n : precedes every output line by its number and a colon.
The first input line has number 1.
- -q : suppresses all output.
- -v : invert the pattern matching (select lines that do not
match pattern).
Posixness
s6-grep is not suitable as a Single Unix
grep
program.