This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin-email utility clipping attached zips


Saro Engels schrieb:
I spoke with Dean as well, the author, and he advised the same. I wrote a little script that accomplishes what I need, and wanted to share it, pasted in line below:

email.bash
#!/bin/bash
export file=""
for x in *.pdf; do
        export file=$file,$x
done
echo $file
email user@domain.com -s test -a $file < sample.txt


I think you should better use the following thing: $ file=*.pdf; file=`echo $file | sed "s/ /,/"` $ echo $file $ email user@domain.com -s test -a $file < sample.txt

your code will return a list starting with a comma:
$ echo $file
,file1.pdf,file2.pdf,file3.pdf...

See it as an improvement - I needed quite long for that part.
SE

I wasn't right: It should be: $ file=*.pdf; file=`echo $file | sed "s/ /,/g"` $ echo $file $ email user@domain.com -s test -a $file < sample.txt

;-)
SE


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]