|
Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!
User Commands env(1)
NAME
env - set environment for command invocation
SYNOPSIS
/usr/bin/env [-i | -] [name=value...] [ utility [ arg... ]]
/usr/xpg4/bin/env [-i | -] [name=value...] [ utility [
arg... ]]
DESCRIPTION
The 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/bin
If env executes commands with arguments, it uses the default
shell /usr/bin/sh (see sh(1)).
/usr/xpg4/bin
If env executes commands with arguments, it uses
/usr/xpg4/bin/sh (see ksh(1)).
OPTIONS
The following options are supported:
-i | - Ignores the environment that would otherwise
be inherited from the current shell. Res-
tricts the environment for utility to that
specified by the arguments.
OPERANDS
The following operands are supported:
name=value Arguments of the form name=value modify the
execution environment, and are placed into
the inherited environment before utility is
invoked.
utility The name of the utility to be invoked. If
utility names any of the special shell
built-in utilities, the results are unde-
fined.
SunOS 5.10 Last change: 2 Jan 2002 1
User Commands env(1)
arg A string to pass as an argument for the
invoked utility.
EXAMPLES
Example 1: Invoking utilities with new PATH values
The following utility:
example% env -i PATH=/mybin mygrep xyz myfile
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.
PATH Determine the location of the utility. If PATH is
specified as a name=value operand to env, the value
given shall be used in the search for utility.
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:
0 Successful completion.
1-125 An error occurred.
126 utility was found but could not be invoked.
127 utility could not be found.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.10 Last change: 2 Jan 2002 2
User Commands env(1)
/usr/bin
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | SUNWcsu |
|_____________________________|_____________________________|
| CSI | enabled |
|_____________________________|_____________________________|
/usr/xpg4/bin
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | SUNWxcu4 |
|_____________________________|_____________________________|
| CSI | enabled |
|_____________________________|_____________________________|
| Interface Stability | Standard |
|_____________________________|_____________________________|
SEE ALSO
ksh(1), sh(1), exec(2), profile(4), attributes(5),
environ(5), standards(5)
SunOS 5.10 Last change: 2 Jan 2002 3
Man(1) output converted with
man2html and wrapped by fishsponge
This page was generated on Wed Sep 12 11:24:36 GMT 2007
|
Your favourite pages:
No pages logged yet. Trying to save cookie... Top 10 most popular pages:
sqlite3 man page (5333 hits) (openSUSE 10.2)
svn man page (5208 hits) (FreeBSD 6.2)
adv_cap_autoneg man page (4870 hits) (Solaris 10 11_06)
CPAN man page (4607 hits) (Suse Linux 10.1)
ssh man page (4342 hits) (Suse Linux 10.1)
ssh-socks5-proxy-connect man page (2874 hits) (Solaris 10 11_06)
netcat man page (2717 hits) (Suse Linux 10.1)
pprosetup man page (2487 hits) (Solaris 10 11_06)
startproc man page (2471 hits) (Suse Linux 10.1)
signal man page (2406 hits) (Suse Linux 10.1)
|