MGREP(1)
π 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 inmboxformat,mgrepmay detect the boundaries used for the mime-encoded messages, plus the attachments, and feed the decoded content of those togrepβ 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 originalgrep, 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 v2MITβ 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
- opensuse-leap 16.0: metamail 2.7.19-bp160.1.13 Β· GPL-2.0-only AND MIT
- opensuse-leap 16.0: metamail 2.7.19-bp160.1.13 Β· GPL-2.0-only AND MIT
- opensuse-leap 16.0: metamail 2.7.19-bp160.1.13 Β· GPL-2.0-only AND MIT
- opensuse-leap 16.0: metamail 2.7.19-bp160.1.13 Β· GPL-2.0-only AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms