version 1.4, 1998/09/23 04:32:39 |
version 1.5, 1999/06/05 01:21:23 |
|
|
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm env |
.Nm env |
.Op Fl i |
.Op Fl i |
.Op Ar name=value ... |
|
.Oo |
.Oo |
|
.Ar name Ns No = Ns Ar value ... |
|
.Oc |
|
.Oo |
.Ar utility |
.Ar utility |
.Op Ar argument ... |
.Op Ar argument ... |
.Oc |
.Oc |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
.Nm env |
.Nm |
executes |
executes |
.Ar utility |
.Ar utility |
after modifying the environment as |
after modifying the environment as |
specified on the command line. The option |
specified on the command line. The option |
.Ar name=value |
.Ar name Ns No = Ns Ar value |
specifies |
specifies |
an environment variable, |
an environment variable, |
.Ar name , |
.Ar name , |
|
|
.Fl i |
.Fl i |
option |
option |
causes |
causes |
.Nm env |
.Nm |
to completely ignore the environment |
to completely ignore the environment |
it inherits. |
it inherits. |
.Pp |
.Pp |
If no |
If no |
.Ar utility |
.Ar utility |
is specified, |
is specified, |
.Nm env |
.Nm |
prints out the names and values |
prints out the names and values |
of the variables in the environment, with one |
of the variables in the environment, with one |
.Ar name=value |
.Ar name Ns No = Ns Ar value |
pair per line. |
pair per line. |
.Sh DIAGNOSTICS |
.Sh DIAGNOSTICS |
If the |
If the |
.Ar utility |
.Ar utility |
is invoked, the exit status of |
is invoked, the exit status of |
.Nm env |
.Nm |
shall be the exit status of |
shall be the exit status of |
.Ar utility ; |
.Ar utility ; |
otherwise, the |
otherwise, the |
.Nm env |
.Nm |
utility exits with one of the following values: |
utility exits with one of the following values: |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
.It 0 |
.It 0 |
The |
The |
.Nm env |
.Nm |
utility completed successfully. |
utility completed successfully. |
.It 1-125 |
.It 1-125 |
An error occurred in the |
An error occurred in the |
.Nm env |
.Nm |
utility. |
utility. |
.It 126 |
.It 126 |
The utility specified by |
The utility specified by |
.Ar utility |
.Ar utility |
was found, but could not be invoked. |
was found, but could not be invoked. |
.It 127 |
.It 127 |
The utility specified by |
The utility specified by |
.Ar utility |
.Ar utility |
could not be found. |
could not be found. |
.El |
.El |
.Sh COMPATIBILITY |
.Sh COMPATIBILITY |
The historic |
The historic |
.Fl |
.Fl |
option has been deprecated but is still supported in this implementation. |
option has been deprecated but is still supported in this implementation. |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr execvp 3 , |
.Xr execvp 3 , |
.Xr environ 7 |
.Xr environ 7 |
.Sh STANDARDS |
.Sh STANDARDS |
The |
The |
.Nm env |
.Nm |
utility conforms to |
utility conforms to |
.St -p1003.2-92 . |
.St -p1003.2-92 . |
.Sh BUGS |
.Sh BUGS |
.Nm env |
.Nm |
doesn't handle commands with equal |
doesn't handle commands with equal |
.Pq Sq = |
.Pq Sq = |
signs in their |
signs in their |