unsetShellEnvVar
unsetShellEnvVar(t_envVarName) =>t/nil
Description
Removes an environment variable from the environment of the calling process. This function expands the environment variable name specified in the argument. If the environment variable (t_envVarName) does not exist in the current environment, the environment is left unchanged.
Arguments
Value Returned
|
The environment variable does not exist or there is an error condition. |
Examples
setShellEnvVar("test=testValue")
=> t
getShellEnvVar("test")
=> "testValue"
unsetShellEnvVar("test")
=> t
getShellEnvVar("test")
=> nil
setShellEnvVar("ITER" "1")
=> t
setShellEnvVar("EDITOR_COPY_$ITER" "$EDITOR")
=> t
getShellEnvVar("EDITOR_COPY_$ITER")
=> "gedit"
unsetShellEnvVar("EDITOR_COPY_$ITER")
=> t
getShellEnvVar("EDITOR_COPY_$ITER")
=> nil
Related Topics
Return to top