|MSED(1)||General Commands Manual||MSED(1)|
||script [msgs ...]|
msedprints the messages msgs with message headers transformed by the commands in script. (See mmsg(7) for the message argument syntax.) If no msgs are passed,
msedwill default to the current message.
msed scripts are akin to a subset of
sed(1) scripts, but optimized for modifying
messages. Note that
msed unfolds and normalizes
message headers, so they may need to be passed through
mmime(7) to ensure RFC 5322 conformance.
The message body is not affected.
msed supports the following commands. The
separators after the command letter may be substituted
with an arbitrary symbol, just as in sed(1).
Multiple commands can be separated by
:’ is not set in the message, add it with the given value.
.*’ to match arbitrary strings at the beginning or end of the headers.
For example, ‘
will delete all headers starting with
X-’ (always case insensitive),
/from:to:cc/d’ will delete
the headers ‘
&’ to the matched string, and ‘
\N’ to the Nth sub-expression, where N is between 1 and 9.
If flags contains the letter
d’, the header is removed if
By default, only the first match is replaced, unless
flags contains the letter
By default, regex is matched case
sensitively, unless flags contains the letter
msedutility exits 0 on success, and >0 if an error occurs.
msedis 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.
|August 1, 2016||x86_64|