Setting Environment Variable

August 29th, 2006 liewsheng Posted in echo, export | Hits: 33688 | 1 Comment »

You may wonder how you knowing the hostname or machine type you are log in. Actually we have a lot way to do so, one of them is print out the environment variable set. How we can set this variable? export is the command used in bash shell, example:

export VARIABLE_NAME="any data you want to put in"

to display the variable set, echo can be use to display it:

echo $VARIABLE_NAME

To print out environment variable using ‘echo’, ‘$’ (dollar sign) must put in front of the variable name.

One Response to “Setting Environment Variable”

  1. [...] Remember, you have to specified http://, and to know more about export, check out HERE.                              [...]

Leave a Reply