Bash perm. evar set in /etc/profile help
Hi, i would like to set some perm env. variables for bash, i am able to do it for root and my user account, but when i change to su i lose my evars. Any ideas would be most appreciated, im using slackware 8.1 by the way.
{edit} I think i can explain this better: Code:
if [ "`id -u`" = "0"]; then but when i change to root with su from my user account i lose my evars, hope that clears things up, thanks again. |
Try
su - rather than su... Cheers, Tink |
:) :) :) Great! Let me guess 'man su', i don't know if i ever would have thought it was so easy, thank's though.
One more thing baffle's me: Code:
[root][#] id -u && echo $? Code:
if [ ! $? = 0 ]; then Thank's! |
Quote:
It doesn't check for the uid there, but for the existence of /sbin in the path. $? holds the success of the grep Cheers, Tink |
Ahh i think i get it. One more thing, where can i learn more about this, is this bash programming? Thank's for the reply's.
|
|
The advanced bash scripting guide, i'm impressed! Thank's Tink.
|
Pleasure mate...
Next time I'll give the link a meaningful name :} Cheers, Tink |
All times are GMT -5. The time now is 01:56 AM. |