execline
Software
skarnet.org
The importas program
importas replaces a literal with the value of an
environment variable, then executes another program.
Interface
importas [ -i | -D default ] [ -u ] [ -s ] [ -C | -c ] [ -n ] [ -d delim ] variable envvar prog...
- importas fetches the value of envvar in the
environment. If neither the -D nor the -i option is given,
and envvar is undefined, the null word is returned.
- importas then performs
variable substitution on prog...,
with variable as key and that string as value.
- importas then execs into the modified prog....
Options
- -D default : If envvar is
undefined, and this option is not given, substitute zero word for
variable instead of the empty word; and if it is given,
substitute default instead. To substitute the empty word,
use -D "".
- -i : Insist. If envvar is undefined,
importas will not do anything; instead, it will exit 100 with an
error message. This has precedence over any -D option.
- -u : Unexport. envvar will be removed from
the environment after the substitution. importas -u variable
envvar is equivalent to importas variable
envvar unexport envvar.
- Other options are used to control
the substitution mechanism.