blob: 440a3ef839a912de20d7b5998d8f6d8e2f7b9fd4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/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}
echo "$from wrote:"
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 >
|