ENV ( 1 ) USER COMMANDSENV ( 1 )


NAME

env - set environment for command invocation

SYNOPSIS

env [ options ] [name=value]... [command ...]

DESCRIPTION

env modifies the current environment according to the name=value arguments, and then invokes command with the modified environment.

If command is not specified, the resulting environment is written to standard output quoted as required for reading by the sh.

OPTIONS

-i, --ignore-environment
Invoke command with the exact environment specified by the name =value arguments; inherited environment variables are ignored. As an obsolete feature, - by itself can be specified instead of -i.
-p, --portable
Quote the values as necessary to be able to be interpretted correctly by the shell.
-u, --unset=name
Unset the environment variable name if it was in the environment. This option can be repeated to unset additional variables.

EXIT STATUS

If command is invoked, the exit status of env will be that of command. Otherwise, it will be one of the following:
0
env completed successfully.
126
command was found but could not be invoked.
127
command could not be found.

SEE ALSO

sh(1), export(1)

IMPLEMENTATION

version
env (AT&T Labs Research) 1999-05-20
author
David Korn <dgkorn@gmail.com>
copyright
Copyright © 1997-2010 AT&T Intellectual Property
license
http://www.opensource.org/licenses/cpl1.0.txt