MGREP(1)

πŸ“¦ version 2.7.19, in opensuse-leap 16.0

πŸ’… MGREP(1) β€” ok so this is the mgrep page, bestie

Like, this is section 1 of the manual (User Commands), and honestly it's a little legend. Sit down, grab a boba, we're decoding mime files together and it's gonna be iconic. 🧚✨


🌸 NAME 🌸

mgrep β€” prints the lines that match your patterns, but in mime-encoded files. Not me making grep go to the gym and come back decoded πŸ’ͺ


πŸ¦‹ SYNOPSIS πŸ¦‹

mgrep [-Q|-X] [GREP_OPTION...] PATTERN [FILE...]
mgrep [-Q|-X] [GREP_OPTION...] -e PATTERNS ... [FILE...]
mgrep [-Q|-X] [GREP_OPTION...] -f PATTERN_FILE ... [FILE...]

✨ DESCRIPTION ✨

Okay so the whole vibe: mgrep ican be used to invoke the grep command on the decoded content of BASE64 or quoted-printable mime-encoded files. (Yes, "ican" β€” that's what the original says, I don't make the rules, I just report them 🫢)

Aside from -Q and -X, literally every option you give it gets passed straight through to grep. No middleman drama, no vibe check, it just forwards them.

If you don't name any file at all, then the standard input gets mime-decoded and fed to grep. Otherwise, the files you named get mime-decoded and fed to grep. Either way grep is eating good tonight πŸ˜€πŸ“

πŸ§ͺ And now a genuinely experimental feature, so listen up: if the input files are in mbox format, mgrep may detect the boundaries used for the mime-encoded messages, plus the attachments, and feed the decoded content of those to grep β€” but not the header. "May" is doing a LOT of heavy lifting in that sentence, so like… don't build your whole personality on it. πŸ’€

πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” shows this help (and also the help of the original grep, because sharing is caring) and then exits. Slay, self-explanatory king.
  • -Q, --quoted-printable β€” assume quoted-printable encoding. That's the assumption, periodt.
  • -X, --base64 β€” assume base64 encoding. This one is the default, so if you're not specifying anything, that's what you're getting. πŸ‘‘

🌈 SEE ALSO 🌈

  • grep(1) β€” the origin, the blueprint, the main character this whole page is about 🫑

⭐ STANDARDS ⭐

πŸ“œ RFC 2045

Multipurpose Internet Mail Extensions, (MIME) Part One: Format of Internet Message Bodies

πŸ“œ RFC 4155

The application/mbox Media Type


πŸ’œ LICENSES πŸ’œ

  • GNU GPL v2
  • MIT β€” mainly the MIME decoding part. (Cute of them to be specific about which bit, honestly πŸŽ€)

πŸ‘‘ AUTHOR πŸ‘‘

Werner Fink <werner@suse.de> β€” the icon who made this happen. Give them their flowers. 🌸✨


🫢 That's the whole page bestie, no cap, every single crumb is here.

Sign-off time 🎬 β€” this is mgrep version 0.2, dated 2019-07-09, and that's the whole manual. Go decode something and text me about it. πŸ’…πŸ¦‹

πŸ“¦ where this page comes from