Let's say I have an environment variable named JAVA_HOME
, defined in /etc/environment
file. I need to append a new value JAVA_HOME/bin
in the PATH
variable. Consider the following,
JAVA_HOME=/usr/apps/jdk1.8.10_1
PATH=/bin/something/:/bin/bash/something:/usr/apps/jdk1.8.10_1/bin
Now if you look at it, if I could replace /usr/apps/jdk1.8.10_1/bin
, with something like below, it would be more convenient.
PATH=/bin/something/:/bin/bash/something:JAVA_HOME/bin
How could I do that? Is it %JAVA_HOME%/bin
?