|
NAMErunenv - run a program with a modified environmentSYNOPSISrunenv [-hV] [-i] [-U acct ] newenv program [ args ... ]DESCRIPTIONrunenv starts program with a modified environment. As distinct from common versions of env(1), modifications are applied only within the environment of program; the environment of runenv itself is not affected.Modifications for the new environment are specified in the argument newenv, which is either a file or a directory. If newenv is a - (single dash), runenv reads the modifications from standard input as described for a file. The argument program may be either a pathname or a filename. If program contains a ``/'' (slash) character, it is considered a pathname and runenv will attempt to invoke it directly. Otherwise, runenv will perform a shell-like search for program within the directories defined in the PATH variable of the runtime environment of runenv. If the argument newenv is a file: The file newenv is opened and read line by line. A line in the form of k=v is interpreted as an environmental variable, k, defined with a value of v. If the variable k does not exist in the current environment, k=v will be added to the environment of program. If the variable k does exist in the current environment, its value will be replaced by v in the environment of program. A line in the form of k only, without =v, specifies that any existing variable k will be deleted (unset) from the environment of program. All names and values read from file are trimmed of leading and trailing whitespace. Empty lines and lines beginning with ``#'' are ignored. If the argument newenv is a directory: Each file k in the directory newenv is interpreted as an environmental variable k=v, where k is the name of the file, and v is read from the first line of the file. As above, if the variable k does not exist in the current environment, k=v will be added to the environment of program. If the variable k does exist in the current environment, its value will be replaced by v in the environment of program. If the file k is empty, then any existing variable k will be deleted (unset) from the environment of program. Filenames in the directory newenv that begin with ``.'' are ignored, and filenames should not contain ``=''. The values read from files in newenv are trimmed of leading and trailing whitespace. No special provision is made for commenting files, except to note that any text occuring after the first line is ignored. Escape sequences: Whether newenv is a file or directory, a limited number of two-character escape sequences are supported within value definitions:
These escape sequences make it possible to embed newlines in values, and provide a way to retain leading and trailing whitespace. Any other ``\'' sequences found within a value are left verbatim. OPTIONS
EXIT STATUSrunenv exits with one of the following values:
AUTHORWayne Marshall, http://b0llix.net/perp/SEE ALSOruntools_intro(8), runargs(8), runargv0(8), runchoom(8), rundetach(8), rundeux(8), runfile(8), runlimit(8), runlock(8), runpause(8), runsession(8), runtool(8), runtrap(8), runuid(8)
Visit the GSP FreeBSD Man Page Interface. |