Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (6561 KB)
env(1)Name | Synopsis | Description | Options | Operands | Examples | Environment Variables | Exit Status | Attributes | See Also Name
Synopsis/usr/bin/env [-i | -] [name=value]... [utility [arg... ]]
/usr/xpg4/bin/env [-i | -] [name=value]...
[utility [arg... ]]
DescriptionThe env utility obtains the current environment, modifies it according to its arguments, then invokes the utility named by the utility operand with the modified environment. Optional arguments are passed to utility. If no utility operand is specified, the resulting environment is written to the standard output, with one name=value pair per line. /usr/binIf env executes commands with arguments, it uses the default shell /usr/bin/sh (see sh(1)). /usr/xpg4/binIf env executes commands with arguments, it uses /usr/xpg4/bin/sh (see ksh(1)). Options
The following options are supported: Operands
The following operands are supported: ExamplesExample 1 Invoking utilities with new PATH valuesThe following utility:
invokes the utility mygrep with a new PATH value as the only entry in its environment. In this case, PATH is used to locate mygrep, which then must reside in /mybin. Environment Variables
See environ(5) for descriptions of the following environment variables that affect the execution of env: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH. Exit Status
If utility is invoked, the exit status of env is the exit status of utility. Otherwise, the env utility returns one of the following exit values: AttributesSee attributes(5) for descriptions of the following attributes: /usr/bin/usr/xpg4/binSee AlsoSunOS 5.10 Last Revised 2 Jan 2002Name | Synopsis | Description | Options | Operands | Examples | Environment Variables | Exit Status | Attributes | See Also |
|