[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

How to pipe a mail message into a program



Ok, I give up, unless no one here knows how to do it (and I know there are
probably 100 or more that know how...)

I need someone to jog me elbow (yes, I used to know how to do this a few
years back, but have forgotten... of course, I've never done it in Linux at
all, just Unix).

Here's the problem:

I want to create a web page that I update based on information coming in via
email messages.  Basically, I'll extract a message ID, the sender's name,
the time, date, and subject.  No problem on that... I know how to do it, I'm
doing it in Perl.  Problem is, I've forgotten how to set the .forward to
pipe my incoming email message to the program.  For testing, I'd actually
like to pipe it to a file first, then build the full featured pipe to the
program.

I've tried a .forward like this:

| cat $1 > file
me mine com

I've tried this:
| echo $1 > file
me mine com

I've tried this:

cat $1 > file
echo $1 > file
cat > file
cat | > file
me mine com

Of course, none of those are the right syntax... and I consider myself a
good shell programmer (these were the frustration attempts, as you can
see....)

So, what's the syntax in bash, guys?  

Bill Ward



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]