Subject: How to pipe to a file?

From: [email-masked] (Pankaj Saxena)
Date: 30 Aug 1996 09:48:58 GMT

I need to be able to pipe certain incoming emails to a script, which
starts off by writing the email to a file, and then processing that file
in certain ways.

I can't get started on the script because I'm not sure how to pipe an
email from Pine to have it written to a file. What should the first
command of the script be, to accept the piped email from Pine and write it
to a file?

Any help is appreciated.

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
Pankaj Saxena                                      email: [email-masked]
University of Illinois                        http://www.uic.edu/~pankaj
Chicago, IL, USA                 finger [email-masked] for PGP key
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

---

From: Paul O Bartlett <[email-masked]>
Date: Fri, 30 Aug 1996 08:57:46 -0400

> command of the script be, to accept the piped email from Pine and write it

    Here is a small script I use to download a message (email -or-
news) to my PC from Un*x Pine.  Note that the first "real" command 
is 'cat'.  That writes the message to a file.

#!/bin/sh
umask 066
trap "rm -f $HOME/tmp/$$download" 0
cat > $HOME/tmp/download.$$$
sz -a $HOME/tmp/download.$$$
rm -f $HOME/tmp/download.$$$
umask 077

Paul                             <[email-masked]>
----------------------------------------------------------
Paul O. Bartlett, P.O. Box 857, Vienna, VA 22183-0857, USA
Finger, keyserver, or WWW for PGP 2.6.2 public key 
Home Page:  URL: http://www.access.digex.net/~pobart