mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-03 15:40:32 +00:00
13 lines
384 B
Bash
Executable File
13 lines
384 B
Bash
Executable File
#!/bin/sh
|
|
# mquote MSG - format MSG as a quotation
|
|
|
|
: ${from:=$(mhdr -d -h x-original-from "$1")}
|
|
: ${from:=$(mhdr -d -h from "$1")}
|
|
: ${from:=Someone}
|
|
|
|
printf '%s wrote:\n' "$from"
|
|
mshow -R "$1" |
|
|
sed -n '/^-- $/!p;//q' | # strip signature
|
|
sed -e :a -e '/^\n*$/{$d;N;ba' -e '}' | # strip empty lines
|
|
sed 's/^/> /' # prefix with >
|