aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xxml/catmutt10
1 files changed, 5 insertions, 5 deletions
diff --git a/xml/catmutt b/xml/catmutt
index 246bf39..601f14f 100755
--- a/xml/catmutt
+++ b/xml/catmutt
@@ -43,17 +43,17 @@ trap "rm -f ${TMPFILE}; exit 1" 1 2 3 13 15
cat > "${TMPFILE}" || exit 1
# Now that we've read in the mailbox file, reopen stdin for mutt/user
-# interaction. We're not technically in a tty, so use a little hack
-# from "greno" at
+# interaction. When in a pipe we're not technically in a tty, so use
+# a little hack from "greno" at
# http://www.linuxforums.org/forum/linux-programming-scripting/98607-bash-stdin-problem.html
-tty="/dev/$(ps -p$$ --no-heading | awk '{print $2}')"
+tty="/dev/`ps -p$$ --no-heading | awk '{print $2}'`"
exec < ${tty}
if [ `wc -c "${TMPFILE}" | awk '{print $1}'` -gt 0 ]; then
- echo 1>&2 "Calling mutt on mailbox file (${TMPFILE})."
+ echo 1>&2 "Calling mutt on temporary mailbox file (${TMPFILE})."
mutt -R -f "${TMPFILE}" "$@"
else
echo 1>&2 "Empty mailbox input."
fi
-rm -f "${TMPFILE}" && echo 1>&2 "Deleted results file (${TMPFILE})."
+rm -f "${TMPFILE}" && echo 1>&2 "Deleted temporary mailbox file (${TMPFILE})."