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

VersionDescription

1.0.0

initial version

Author

Allan CORNET

Last updated