Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Prblem with bash and rsync


On Thu, Feb 10, 2005 at 10:59:53AM +1100, Ian Wienand (ianw@xxxxxxxxxxxxxxxxxx) wrote:
> On Thu, Feb 10, 2005 at 10:40:45AM +1100, Jobst Schmalenbach wrote:
> > COMMAND="$RSYNC -rlptgoD --delete --delete-excluded --exclude .snapshot --exclude \"Temporary Internet Files\" /$d/ $TARGET"
> > if [ $DEBUG == 1 ]; then $ECHO $COMMAND; fi
> > $COMMAND
> 
> Try using eval around this, e.g.
> 
> eval $COMMAND
> 
> You need bash to re-evaluate those quotes so it understands it should
> be one argument.


******** THANK YOU !!!!!!!!!!!!! ***********


I dont quite understand why (maybe I am to much thinking
of perls and phps eval stuff) .... especially if I 
read bash's man page which does not mention anything
about what you suggested.


Further if I consider

  --exclude \"\"Temporary Internet Files\"\"

which after the shell got it should(?) be

  --exclude \"Temporary Internet Files\"

and further if I pass a construct to other
util they are still "kept together", eg:

  $MKDIR \"this is a spacy name\"


But thank you, its working ...
jobst







-- 
The email address in this email is used for Mailing Lists Only. 
Please reply to the list email address ONLY, do not reply to the
email directly, it is piped into /dev/null if its not received
from a mailing list email address.

Be gentle with the earth.


             __, Jobst Schmalenbach, Technical Director
   _ _.--'-n_/   Barrett Consulting Group P/L & The Meditation Room P/L      
 -(_)------(_)=  +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia