3 mquote - format MSG as a quotation.
5 This is a tweaked copy of mquote from mblaze that adds the date of the
12 : ${from:=$(mhdr -d -h x-original-from "$1")}
13 : ${from:=$(mhdr -d -h from "$1")}
18 pfmt="%a, %d %b %Y %H:%M:%S %z"
19 : ${date:=$(mhdr -d -h date "$1")}
20 date="${date:+$(dateconv -f "$pfmt" "$date")}"
22 printf '%s%s wrote:\n' "${date:+On $date, }" "$from"
24 Then strip the signature, empty lines and prefix everything with ">"
26 { mshow -R "$1" || mshow -h '' -N "$1"; } |
27 sed -n '/^-- $/,$!p' |
28 sed -e :a -e '/^\n*$/{$d;N;ba' -e '}' |