S6-GREP(1)

๐Ÿ“ฆ version 2.3.1.2, in nixpkgs unstable

๐Ÿ’… S6-GREP(1) โ€” the match-input-against-a-pattern girlie

okay so bestie, this is a page from the General Commands Manual for s6-grep, and honestly? she's serving utility. let's get into it โœจ


๐ŸŒธ NAME ๐ŸŒธ

s6-grep โ€” match input against a pattern ๐ŸŽฏ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

s6-grep [-E | -F] [-i] [-c] [-n] [-q] [-v] pattern

๐Ÿ’– DESCRIPTION ๐Ÿ’–

so like, s6-grep compiles pattern as a Basic Regular Expression[2]. literally that's her whole thing. she reads stdin and matches every single line against this regexp, and if the line matches, she prints it to stdout. no cap. ๐Ÿซถ

when she hits EOF, she exits with code 0 if one or more lines matched, and 1 otherwise. main character energy: matched at least once? slay. matched nothing? okay, exit 1, it's giving shrug. ๐Ÿ˜ญ


โœจ OPTIONS โœจ

  • -F โ€” pattern is not compiled as a BRE, but is interpreted as a literal string. like, take it at face value, no regex shenanigans ๐Ÿ’…
  • -E โ€” pattern is not compiled as a BRE, but as an Extended Regular Expression[3]. glow-up mode for your pattern ๐Ÿ”ฅ
  • -i โ€” ignore case during the match. Hello and hello are literally the same to her, obsessed ๐ŸŽ€
  • -c โ€” do not write normal output; only write the number of lines that have matched pattern after EOF is received. a little count girlie, she's counting ๐Ÿงฎ
  • -n โ€” precede every output line by its number and a colon. the first input line has number 1. numbered like a ranking, iconic ๐Ÿ‘‘
  • -q โ€” do not write anything to stdout. silent treatment, but make it useful ๐Ÿ™ˆ
  • -v โ€” invert the pattern matching (select lines that do not match pattern). flipped perspective, vibe check reversed ๐ŸŒˆ

๐Ÿ’€ EXIT STATUS ๐Ÿ’€

  • 111 โ€” Temporary error. it's not you, it's temporary ๐Ÿ˜ญ
  • 100 โ€” Permanent error, such as a misuse. permanent. periodt. ๐Ÿšฉ
  • 127 โ€” Unable to execute program โ€” not found. she's not here, bestie ๐Ÿซฅ
  • 126 โ€” Unable to execute program โ€” other reason. she's here but something's off ๐Ÿ’€

๐ŸŒŸ SEE ALSO ๐ŸŒŸ

the whole friend group, fr fr:

s6-basename(1), s6-cat(1), s6-chmod(1), s6-chown(1), s6-clock(1), s6-cut(1), s6-dirname(1), s6-dumpenv(1), s6-echo(1), s6-env(1), s6-expr(1), s6-false(1), s6-format-filter(1), s6-head(1), s6-hiercopy(1), s6-linkname(1), s6-ln(1), s6-ls(1), s6-maximumtime(1), s6-mkdir(1), s6-mkfifo(1), s6-nice(1), s6-nuke(1), s6-pause(1), s6-printenv(1), s6-quote(1), s6-quote-filter(1), s6-rename(1), s6-rmrf(1), s6-seq(1), s6-sleep(1), s6-sort(1), s6-sync(1), s6-tai64ndiff(1), s6-tail(1), s6-touch(1), s6-true(1), s6-uniquename(1), s6-unquote(1), s6-unquote-filter(1), s6-update-symlinks(1), seekablepipe(1)

and the linkies, exactly as given:

this man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-portable-utils/s6-grep.html


โญ STANDARDS โญ

s6-grep is not suitable as a grep[1] program conforming to . (yeah that sentence just ends there in the source, the standard's name got left blank โ€” not me, I'm just the messenger ๐Ÿ’€) so like... don't expect full POSIX grep conformity, bestie. she's her own thing ๐Ÿฆ‹


๐Ÿ’œ AUTHORS ๐Ÿ’œ

  • Laurent Bercot
  • Alexis <flexibeast@gmail.com> (man page port)

anyway that's the whole page, mwah ๐Ÿซถ and for the credits at the very bottom: this is from Debian, dated April 16, 2022 โ€” ๐Ÿ’– thanks for coming to my TED talk, go grep something iconic ๐Ÿ’–

๐Ÿ“ฆ where this page comes from