linux - environmental variable duplicating in all shells when exporting from a single user -


we have application 1 shell script file maintains environmental variables, set export. these variables used run external commands in application. so, have many users running same application single server own home directories. when user run application, executable in user b path running. set environmental variables each user executable supposed run user a's own path.

how can make executable run user's own path?

sample.sh

export ha_inc=/home/a/proj export ha_exe=/home/a/proj/bin 

these above file cloned users when application cloned git. whenever user executing command, in ha_exe directory, executable running other users' directory. users using own shells.

i think can have system-wide shell script in /etc/profile.

to represent current user's home directory, use "~". represent b's home directory, use "~b".


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -