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:

    “Oh, let’s go up the hill and scare ourselves,
    As reckless as the best of them tonight,
    By setting fire to all the brush we piled
    With pitchy hands to wait for rain or snow....”
    Robert Frost (1874–1963)

    The poorest children in a community now find the beneficent kindergarten open to them from the age of two-and-a-half to six years. Too young heretofore to be eligible to any public school, they have acquired in their babyhood the vicious tendencies of their own depraved neighborhoods; and to their environment at that tender age had been due the loss of decency and self-respect that no after example of education has been able to restore to them.
    Virginia Thrall Smith (1836–1903)

    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)