| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Rajiv Bhan <rsb...@gmail.com> wrote: > After running, a pdf report is generated, which I try to send to > my e-mail address using Mutt: > mutt -a report.pdf -s "Report for 2008-Mar-28" > myemailaddr...@mydomain.com < "." I have the same problem in my .bash script: the following command works fine in my script: mutt -s "subject" -a /tmp/test.txt myname@yahoo.com < $2 but if I do MAILLINE="mutt -s \"subject\" -a /tmp/test.txt myname@yahoo.com < $2" and then $MAILLINE I get the (user unknown.) error too. Max |
|
#2
| |||
| |||
| max <maxxx126@gmail.com> wrote: > > Rajiv Bhan <rsb...@gmail.com> wrote: >> After running, a pdf report is generated, which I try to send to >> my e-mail address using Mutt: > >> mutt -a report.pdf -s "Report for 2008-Mar-28" >> myemailaddr...@mydomain.com < "." > > I have the same problem in my .bash script: > > the following command works fine in my script: > > mutt -s "subject" -a /tmp/test.txt myname@yahoo.com < $2 > > but if I do > > MAILLINE="mutt -s \"subject\" -a /tmp/test.txt myname@yahoo.com < $2" > and then > $MAILLINE > > I get the (user unknown.) error too. > > Max You can't put the redirection symbol '<' within the quotes, it won't be recognized as a redirection, so mutt is seeing < and whatever $2 expands to as user names. If you really want to embed the < within the quotes, you need to eval $MAILLINE, but you might need to experiment with the syntax since eval effectively re-scans the expanded variable. Jerry |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.