I want to extract users environment variables via a sh script, and for some reason it is not working.
According to the su man page:
But this doesn't work for me. What I expect to see is /opt/bb/bbhome , But I get nothing
I can see the settings but I can't extract just one.
I want bbhome to be /opt/bb/bbhome and then use bbhome in a script.
So does anyone know why the -c option in su is not working ?
I don't want to write a function just to set a variable, since the -c option should do this.
1. The problem statement:
What is the mesg value set for your environment? If it is on, how would you turn off your current
session? How would you set it permanently?
3. The attempts at a solution :
Read Unix The textbook.
3rd chapter has many things like environment variables and... (5 Replies)
Hi all!
I have the following problem:
I want to create a symbolic link at the root: /a
which points to the folder: /b/MyFiles
It's simple, but here comes the troubling part. If I log in with an other user at the same time, I would like to see the following under a:
/b/HisFiles
so... (1 Reply)
say i define an environment variable in a particular script (upgrade.sh).
my script is upgarde.sh and it calls another script try.sh. will this environment variable be accessible to try.sh also. if not how to I make environment variables global so that they can be used by any script. (2 Replies)
I want the user to be able to commands as another user.. but when they do that.. I need them to have the environment variables of the other user. is this possible with sudo?
sudo -H -u user env
'env' is giving me the environment of the current user, not the user I want to run commands as.
... (1 Reply)
hi
I need to add environment variables for all users and make them available when they login.
I don't know which file to edit. Also these variables should be displayed when "env" command is executed.
Please help....which file is common for all users, without editing their specific .profile or... (2 Replies)
Hello,
I am interested in your strategy for handling engineers Unix accounts when the engineers must log in to resources in a variety of locals in a global environment. The engineers home directory and normal environment is local to where the engineer is sitting. When they log in to a remote... (0 Replies)
hi,
I want to create a new EV(Environment Variable) through a c program and I done this thing through setenv() method. But the newly created EV is not permanent, i.e. when I exit from the program the EV also no longer lives. But I want to make it a permanent EV for the current user. Actually I... (6 Replies)
hi,
1). i would like to know what is meant by environment variables?
2). is the number of envi variables is a constant number for unix systems?
3). how to see the list of envi variables (and the values of the envi variables)in a single command?
4). if this questions were already asked... (3 Replies)
Hi!
How-to get the environment variables in GNU.
getenv() only fetches the ones that you can find under export (not the ones under declare)...
best regars .David (2 Replies)