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:

    “should some limb of the devil
    Destroy the view by cutting down an ash
    That shades the road, or setting up a cottage
    Planned in a government office, shorten his life,
    Manacle his soul upon the Red Sea bottom.”
    —William Butler Yeats (1865–1939)

    “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)

    “Science is feasible when the variables are few and can be enumerated; when their combinations are distinct and clear. We are tending toward the condition of science and aspiring to do it. The artist works out his own formulas; the interest of science lies in the art of making science.”
    —Paul Valéry (1871–1945)