Environment Variable - Getting and Setting Environment Variables

Getting and Setting Environment Variables

The variables can be used both in scripts and on the command line. They are usually referenced by putting special symbols in front of or around the variable name. For instance, to display the user home directory, in most scripting environments, the user has to type:

echo $HOME

On DOS, OS/2 or Windows systems, the user has to type this:

echo %HOME%

In Windows PowerShell, the user has to type this:

Write-Output $HOME

Read more about this topic:  Environment Variable

Famous quotes containing the words setting, environment and/or variables:

    Linnæus, setting out for Lapland, surveys his “comb” and “spare shirt,” “leathern breeches” and “gauze cap to keep off gnats,” with as much complacency as Bonaparte a park of artillery for the Russian campaign. The quiet bravery of the man is admirable.
    Henry David Thoreau (1817–1862)

    Modern man’s capacity for destruction is quixotic evidence of humanity’s capacity for reconstruction. The powerful technological agents we have unleashed against the environment include many of the agents we require for its reconstruction.
    George F. Will (b. 1941)

    The variables are surprisingly few.... One can whip or be whipped; one can eat excrement or quaff urine; mouth and private part can be meet in this or that commerce. After which there is the gray of morning and the sour knowledge that things have remained fairly generally the same since man first met goat and woman.
    George Steiner (b. 1929)