Saro Engels wrote:

> I wasn't right:
> It should be:
> $ file=*.pdf; file=`echo $file | sed "s/ /,/g"`
> $ echo $file
> $ email [EMAIL PROTECTED] -s test -a $file < sample.txt

Firstly this can be simplified to simply:

email [EMAIL PROTECTED] -s test -a $(echo *.pdf|sed "s/ /,/g") <sample.txt

but this will not work if any filename or pathname contains spaces.  You
can solve that with:

email [EMAIL PROTECTED] -s test -a "$(sh -c 'IFS=,; echo "$*"' -- *.pdf)" \
                <sample.txt

Brian

--
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/

Reply via email to