LA.pm: Shell

Arkadiy Sudarikov asudarikov at xceed.com
Tue Dec 18 15:56:47 CST 2001


Hello, everybody. I need some help with Shell (Bourne shell).

I need to combine output of a HERE document and output of a Perl script to
be input to a command .. without creating a file...

Basically, I would like to have a HERE document for an email header and Perl
script creates the body of the email and all of this, together, is sent to
sendmail or whatever... How can I do this?

Right now I am using a file:

FILE=file

EMAIL_FILE=email_file

cat - > $EMAIL_FILE << EMAIL
From: XXX <xxx at xxx.xxx>
To: $EMAIL
Subject: xxx

EMAIL

./encode_base64.pl $FILE | cat - >> $EMAIL_FILE

cat $EMAIL_FILE | sendmail -oi -t



More information about the Losangeles-pm mailing list