The s6-grep program
s6-grep matches its input against a pattern.
s6-grep [ -E | -F ] [ -i ] [ -c ] [ -n ] [ -q ] [ -v ] pattern
- s6-grep compiles pattern as a
- 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
- -F : pattern is not compiled as a BRE, but is
interpreted as a literal string.
- -E : pattern is not compiled as a BRE, but as an
Regular Expression (ERE).
- -i : ignore case during the match
- -c : do not write normal output; only write the number of
lines that have matched pattern after EOF is received
- -n : precede every output line by its number and a colon.
The first input line has number 1.
- -q : do not write anything to stdout
- -v : invert the pattern matching (select lines that do not
s6-grep is not suitable as a Single Unix