UNIX |
Guys, you must wonder what export command does in UNIX platform?
It's one of the most basic thing one must know about UNIX.
All the UNIX newbies have come to a right place for a detailed export command explanation. :)
Lets start with an example:
You can assign value before exporting using the following syntax:
- export inferno=value
OR
- inferno=value
- export inferno
Here the variable inferno will be declared globally within the current session.
Example:
export JAVA_HOME = C:\Program Files (x86)\Java\jre1.8.0_92
export PATH = JAVA_HOME/bin:$PATH
Here, why I ran PATH command? is to include java binaries in path variable. Basically PATH carries all the paths for the binaries and is ':' separated variable.
If you run a command "which java", it will search in $PATH variable & if it exists it will tell you from where the java binaries are picked up & from where the command is running.
in this way export & PATH variables are most wanted variables in UNIX.
get back with any doubts guys. try using this & see the magic, how good you will become in UNIX. :)
Keep visiting & keep sharing. :)
No comments:
Post a Comment