On Wednesday 31 August 2005 12:27, Ehud Karni wrote: > > --------------------------- > > #!/bin/bash > > > > subject='Set UID program scan results' > > address="[EMAIL PROTECTED]" > > mailcommand="mutt $address -s $subject" > > > > $mailcommand << okfff > > Some message body. > > > > okfff > > --------------------------- >
One other way is: cat <<EOD | $mailcommand However, the whole $mailcommand idea here is useless, I 'd do (by the way, why use mutt as a command line mail sender ? I'd use /bin/mail). #!/bin/bash subject="`/some/setuid/program/runs/here`" mailaddr="[EMAIL PROTECTED]" mailcmd=/usr/bin/mutt cat <<EOF | $mailcmd $mailaddr -s "$subject" blah blah blah blah EOF exit 0 > > Some message body. > > > > okfff > The way to overcome this is to use the IFS environment variable. > > subject='Set UID program scan results' > address="[EMAIL PROTECTED]" > mailcommand="mutt/$address/-s/$subject" ## space replaced by / > > IFS="/" ## use / as word separator > $mailcommand << okfff > Some message body. > > okfff > > Of course you can use any other character that is not in your text > (e.g ~, =, :, %) but do not try to use characters with shell meaning > (e.g. (, ), [, ], <, >, ;, *). > > Ehud. > > > -- > Ehud Karni Tel: +972-3-7966-561 /"\ > Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign > Insurance agencies (USA) voice mail and X Against HTML Mail > http://www.mvs.co.il FAX: 1-815-5509341 / \ > GnuPG: 98EA398D <http://www.keyserver.net/> Better Safe Than Sorry > > ================================================================= > To unsubscribe, send mail to [EMAIL PROTECTED] with > the word "unsubscribe" in the message body, e.g., run the command > echo unsubscribe | mail [EMAIL PROTECTED] > > > +++++++++++++++++++++++++++++++++++++++++++ > This Mail Was Scanned By Mail-seCure System > at the Tel-Aviv University CC. -- -- Ariel Biener e-mail: [EMAIL PROTECTED] PGP: http://www.tau.ac.il/~ariel/pgp.html ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]