MSED(1)
π MSED(1) β the manual page, but make it cute
okay bestie, we're doing msed today β it's a General Commands Manual page, and it's literally about manipulating message headers. buckle up π
β¨ NAME β¨
msed β manipulate message headers π
πΈ SYNOPSIS πΈ
msed script [msgs ...]
π¦ DESCRIPTION π¦
So here's the tea, bestie: msed prints out the messages msgs, but with their message headers transformed by the commands you put in script. πͺ (btw if you're confused about how message arguments even work, go read mmsg(7) β it's giving "the syllabus", iykyk.)
And if you pass no msgs at all? No worries, she just defaults to the current message. main character energy, honestly. π
Now, msed scripts are like a subset of sed(1) scripts, except optimized for modifying messages. π But lowkey important: msed unfolds and normalizes message headers, so they might need to be passed through mmime(7) to make sure they're RFC 5322 conformant. The message body? Untouched. Not her business. She doesn't look at it. π
msed supports the following commands. The separators after the command letter can be swapped out for an arbitrary symbol, just like in sed(1). And you can stack multiple commands by separating them with β;β. slay.
/header/a/value/β if the header βheader:β isn't set in the message, add it with the value you gave. simple as that. β¨/headers/c/value/β change colon-separated headers matching the regular expression headers (with implicit anchoring to the header name, so she knows what she's about) to the value given in value. π/headers/dβ delete colon-separated headers matching the regular expression headers, with implicit anchoring to the header name. If you want to match arbitrary strings at the beginning or end of the headers, you gotta use an explicit β.*β β be specific, bestie.
For example, β/x-.*/dβ will delete all headers starting with βX-β (and it's always case insensitive, no cap), and β/from:to:cc/dβ will delete the headers βFrom:β, βTo:β, and βCc:β. bye girlies π
[/headers/]s/regex/replacement/[flags]β substitute matches of the POSIX Basic Regular Expression regex in headers matching the POSIX Basic Regular Expression headers, with implicit anchoring to the header name (or all headers, if you omit it), with the string replacement. The β&β expands to the matched string, and β\Nβ expands to the Nth sub-expression, where N is between 1 and 9. π§
If flags contains the letter βdβ, the header is removed if regex matched. ποΈ
By default, only the first match is replaced β unless flags contains the letter βgβ. π
By default, regex is matched case sensitively β unless flags contains the letter βiβ. π
π EXIT STATUS π
The msed utility exits 0 on success, and >0 if an error occurs. that's it, that's the vibe check.
π SEE ALSO π
sed(1), mhdr(1), mmsg(7), regex(7) / re_format(7)
π AUTHORS π
Leah Neukirchen <leah@vuxu.org> π
π LICENSE π
msed is in the public domain. π«Ά
To the extent possible under law, the creator of this work has waived all copyright and related or neighboring rights to this work.
http://creativecommons.org/publicdomain/zero/1.0/
no cap, that's the whole page. every flag, every regex, every header. periodt. π β¨
and that's a wrap bestie β this was MSED(1) from the Debian manual set, dated August 1, 2016. go forth and edit those headers, you absolute icon ππ¦π
π¦ where this page comes from
- alpine 3.24: mblaze-doc 1.4-r0 Β· CC0-1.0
- debian bookworm: mblaze 1.1-1 Β· CC0-1.0
- debian trixie: mblaze 1.1-1 Β· CC0-1.0
- nixos 26.05: mblaze 1.4
- nixpkgs unstable: mblaze 1.4
- ubuntu jammy: mblaze 1.1-1 Β· CC0-1.0
- ubuntu noble: mblaze 1.1-1 Β· CC0-1.0
- ubuntu resolute: mblaze 1.1-1build1 Β· CC0-1.0
- ubuntu stonking: mblaze 1.1-1build1 Β· CC0-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms