GNU Rush |
|
Restricted User Shell |
Sergey Poznyakoff |
The following actions modify the environment in which the program will be executed.
Clear the environment.
Retain the names in list in the environment. This statement
should be used in conjunction with clrenv
.
Argument is a whitespace delimited list of variables to retain. Each element in the list can be either a variable name, or a shell-style globbing pattern, in which case all variables matching that pattern will be retained, or a variable name followed by an equals sign and a value, in which case it will be retained only if its actual value equals the supplied one. For example, to retain only variables with names beginning with ‘LC_’:
keepenv "LC_*"
Set the environment variable name. The value argument is subject to variable expansion (see Variable expansion) and backreference interpretation (see backreference).
For example, to modify the PATH
value:
setenv PATH = "$PATH:/opt/bin"
Unset environment variables listed as arguments.
Argument is a whitespace delimited list of variables to retain. Each element in the list can be either a variable name, or a shell-style globbing pattern, in which case all variables matching that pattern will be unset, or a variable name followed by an equals sign and a value, in which case it will be unset only if its actual value equals the supplied one.
Performs backslash interpretation, backreference interpretation
and variable expansion on string and discards the result.
This statement is similar to the shell’s colon statement.
For example, the following statement will define the DEPTH
variable and initialize it to 10, unless it is already defined:
evalenv ${DEPTH:=10}
This document was generated on January 2, 2022 using makeinfo.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.