Restricted User Shell
env action allows to modify the environment in which the
program will be executed.
Modify the environment.
Its arguments are a whitespace-delimited list of specifiers. Each specifier can contain references to variables from the inherited environment. The reference syntax is the same as in Bourne shell.
The following specifiers are understood:
Clear the environment. This is understood only when used as a first word in args.
Unset the environment variable name.
Unset the environment variable name only if its value is val.
Retain the environment variable name.
Define environment variable name to have given value.
Retain variable name and append value to its value. If no
such variable is present in the environment, it is created and
value is assigned to it. However, if value starts with a
punctuation character, this character is removed from it before the
assignment. This is convenient for using this construct with
environment variables like
In this example, if
PATH exists, ‘:/sbin’ will be appended
to it. Otherwise, it will be created and ‘/sbin’ will be
assigned to it.
This is roughly equivalent to
Retain variable name and prepend value to its value. If no such variable is present in the environment, it is created and value is assigned to it. However, if value ends with a punctuation character, this character is removed from it before assignment.
This document was generated on October 1, 2016 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.