RE: [suse-programming-e] [Suse 8.0] Send a file attachment Using mutt in a shell script..
The subject of the mutt command should be in quotes. Also it would be better if you included the full path name for "answer1". -----Original Message----- From: robert guru [mailto:sos_linux@hotmail.com] Sent: Tuesday, May 17, 2005 2:51 AM To: suse-programming-e@suse.com Subject: [suse-programming-e] [Suse 8.0] Send a file attachment Using mutt in a shell script.. hallo, I' m trying to create a shell script that search for some files named 'answer', and for each file founded, the shell script have to email it as an attachment using the 'mutt' program. My script is ############### the script #################### #!/bin/bash lancer="/usr/bin/mutt -x" for i in $(ls -p) do case $i in */) cd $i; pth=$PWD; for sname in $(ls) do case $sname in answer*) ii=`basename $i`; comm=$lancer" -s THE_RESULT -a "$sname" "$ii" < a_text_file"; echo $comm; result=`$comm`; esac done cd ..;; esac done ########## The result of the shell script ########### echo $comm: ---> /usr/bin/mutt -x -s THE_RESULT -a answer1 sos_linux@hotmail.com < a_text_file ( for this example, the file answer1 exists in /home/account/sos_linux@hotmail.com so here $ii is sos_linux@hotmail.com ) result=`$comm`: ---> deadlock, this command can not be completed,(in the case of ... "$ii" < a_text_file") ---> show the message "No recipients specified." in the case of ... "$ii" <a_text_file" (without space between '<' and 'a_text_file') ####################################### So what's the cure of this problem ? Thanks. _________________________________________________________________ Take charge with a pop-up guard built on patented Microsoft® SmartScreen Technology http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=htt p://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*. -- To unsubscribe, email: suse-programming-e-unsubscribe@suse.com For additional commands, email: suse-programming-e-help@suse.com Archives can be found at: http://lists.suse.com/archive/suse-programming-e
participants (1)
-
Wenzel, Scott