From 2a9c1668ebc48eb0077f289970a348944b78010d Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 1 Aug 2016 18:00:52 +0200 Subject: mquote: extract from mcomp, refine --- mquote | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 mquote (limited to 'mquote') diff --git a/mquote b/mquote new file mode 100755 index 0000000..1a68f50 --- /dev/null +++ b/mquote @@ -0,0 +1,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 > -- cgit 1.4.1