<< createGUID os functions hostname >>

getenv


Get the value of an environment variable.


Syntax


s = getenv(env_name)

Input argument


env_name

a string: environment variable name.

Output argument


s

a string: the environment variable value.

Description


getenv returns the value of an environment variable if it exists.

If the environment variable does not exist, it will return ''.

Example


getenv('OS')
getenv('myenvvar')

See also


setenv, searchenv.

History


Version Description
1.0.0 initial version

Author


Allan CORNET

<< createGUID os functions hostname >>