setenv — set an environment variable then chain
setenv
{var
} {val
} {next-prog
}
C-shells have a built-in setenv command that does not chain. See the manual for each individual shell for its built-in command.
setenv is a chain-loading utility that sets the environment variable var
to the value val
and then chain loads to next-prog
with the execvp(3) function.
next-prog
may contain its own command line options, which setenv will ignore.
An empty val
is not the same as unsetting the variable.
For that, see unsetenv(1).
If either var
or val
contain an equals
character, counter-intuitive things will happen to the environment.