[vox-tech] Inheriting env variables when you do a su
Richard Crawford
vox-tech@lists.lugod.org
Wed, 23 Apr 2003 12:15:38 -0700 (PDT)
Tim Riley wrote,
> Sure: export SPIFFY_VAR. Then the -c option is not needed.
So, for example, in my script I'd write,
SPIFFY_VAR=/home/stuff
export SPIFFY_VAR
.
.
.
su process_user "{$SPIFFY_VAR}/do/something/cool.exe"
?
(Pardon the ignorance... Bash scripting is not something I'm at all
familiar with, and I've suddenly found myself in a job where I'll be doing
a lot of it -- on a Solaris box, no less. Yikes.)
--
Slainte,
Richard S. Crawford
AIM: Buffalo2K / Y!: rscrawford / ICQ: 11640404
http://www.mossroot.com http://www.stonegoose.com
"It is only with our heart that we can see clearly. What is essential is
invisible to the eye." --Antoine de Saint Exupery