SUMMARY: su - $user and use user .profile variables.
2007-12-25 3:47:00
all my problems
su - user -c '(cd $VARIABLE ; ... )'
the single quotes delay the substitution from the
outer shell, so it
works
in the subshell. Since $VARIABLE isn't set in the
environment from
which
su - is run, what gets passed to cd is the empty
string. Using single
quotes, the '$VARIABLE' remains intact and gets the
substitution when
su
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
Comments
Got something to say?
You must be logged in to post a comment.

