LBZGREP(1)

πŸ“¦ version 1.0, in fedora 43, fedora 44

πŸ’– LBZGREP(1) β€” General Commands Manual πŸ’–

okay bestie, sit down, because this one is so useful and nobody talks about it. it's lbzgrep, section 1 of the General Commands Manual, and it's literally just grep but it doesn't care if your files are squished. no cap.


✨ NAME ✨

lbzgrep β€” search possibly compressed files for a regular expression πŸ¦‹

like. you know how grep is the main character of your terminal? this is grep's cooler cousin who also opens the zipped-up stuff without you having to do anything. obsessed.


✨ SYNOPSIS ✨

lbzgrep [ grep_options ] [ -e ] pattern filename...

that's it. that's the whole vibe. grep options, optionally a -e, a pattern, and some filenames. slay.


✨ DESCRIPTION ✨

okay so here's the tea, and the tea is delicious:

Zgrep invokes grep on compressed or lbzip2ped files. that's the whole trick. it just finds your grep, hands it the decompressed goods, and lets it cook. πŸ‘‘

All options specified are passed directly to grep. every single one. you're not learning a new tool, you're using grep with a little fairy godmother in front of it 🧚

If no file is specified, then the standard input is decompressed if necessary and fed to grep. so you can pipe stuff in and it'll handle it. Otherwise the given files are uncompressed if necessary and fed to grep. notice the if necessary β€” it's not doing extra work for no reason, it's a considerate queen πŸ’…

🌸 the GREP environment variable?? If the GREP environment variable is set, lbzgrep uses it as the grep program to be invoked. so if you've got a specific grep you're loyal to, it respects that. periodt.

✨ EXIT STATUS ✨

the vibes report card, fr fr:

  • 0 β€” for a match. we found it bestie πŸŽ‰
  • 1 β€” for no matches. it's not there, and honestly? that's valid too 😭
  • 2 β€” if trouble. something went wrong, and that's a different energy entirely πŸ’€

✨ BUGS ✨

okay so this is the part where we're honest. not every grep option makes it through the portal. The following grep options are not supported:

  • --dereference-recursive (-R)
  • --directories (-d)
  • --exclude
  • --exclude-from
  • --exclude-dir
  • --include
  • --null (-Z)
  • --null-data (-z)
  • --recursive (-r)

that's the list. don't come for me, come for the source code. πŸ™ˆ


✨ AUTHOR ✨

the legend themselves: Charles Levert (charles@comm.polymtl.ca). absolute icon, we thank them for their service 🫢


✨ SEE ALSO ✨

your reading list, bestie, go be nosy:


and that's the whole page!! from the General Commands Manual, this is LBZGREP(1), section 1, and it lives in the same family as the rest of the lbz* squad ✨ go forth and grep your compressed files, you gorgeous genius πŸ’–πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from