SUMMARY:Re: su - user -c "cd $VARIABLE;find . -name sri" doesn't work.

From: sreenath sarikonda <sreeredhat_at_yahoo.com>
Date: Tue Aug 03 2004 - 15:49:53 EDT
Thank you everyone who replied this. But only this
worked which is suggested  by Mark.Thank you Mark.

If you want "$VARIABLE" to come from the environment
of "user" you must 
escape the dollar sign so your shell will ignore it. 
There are several 
ways but this should work:

su - user  -c "cd \$VARIABLE;find . -name sri"

Hope this helps (and I hope that I haven't
misunderstood your 
problem...).



Sree.


Hi Gurus,
> 
> su - user  -c "cd $VARIABLE;find . -name sri"
> doesn't
> work.
> 
>     I read the previous messages in the forum but
> could not get it to work. The script is finding
> files
> in user_home instead in a specified path where I
> want
> to run. Making this work is of great improtance to
> me.The script which will invoke the above command is
> run in cron as root. I read shell wrappers could be
> used but I am not sure. If so please point me to
> link
> where I can delve into it.
> 
> Thank you,
> Sree.



		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Aug 5 17:49:14 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:36 EST