2015-10-08 11:15:08 -04:00
|
|
|
.Dd 2015-10-08
|
2015-01-31 08:20:02 -05:00
|
|
|
.Dt ENV 1
|
2015-01-31 14:37:03 -05:00
|
|
|
.Os sbase
|
2015-01-23 18:22:06 -05:00
|
|
|
.Sh NAME
|
|
|
|
.Nm env
|
|
|
|
.Nd modify the environment, then print it or run a command
|
|
|
|
.Sh SYNOPSIS
|
2015-01-30 15:17:58 -05:00
|
|
|
.Nm
|
2015-01-23 18:22:06 -05:00
|
|
|
.Op Fl i
|
2015-03-02 08:50:43 -05:00
|
|
|
.Oo Fl u Ar var Oc ...
|
|
|
|
.Oo Ar var Ns = Ns Ar value Oc ...
|
2015-01-23 18:22:06 -05:00
|
|
|
.Oo Ar cmd Oo arg ... Oc Oc
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
|
|
|
unsets each
|
2015-03-02 08:50:43 -05:00
|
|
|
.Ar var ,
|
2015-01-23 18:22:06 -05:00
|
|
|
then adds or sets each
|
2015-03-02 08:50:43 -05:00
|
|
|
.Ar ( var , value )
|
2015-01-23 18:22:06 -05:00
|
|
|
tuple in the environment.
|
|
|
|
.Pp
|
2013-07-20 01:27:42 -04:00
|
|
|
If
|
2015-01-23 18:22:06 -05:00
|
|
|
.Ar cmd
|
|
|
|
is given, it is executed in this new environment;
|
|
|
|
otherwise, the modified environment is printed to stdout.
|
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Fl i
|
|
|
|
Completely ignore the existing environment and execute
|
|
|
|
.Ar cmd
|
|
|
|
only with each
|
2015-03-02 08:50:43 -05:00
|
|
|
.Ar ( var , value )
|
2015-01-23 18:24:42 -05:00
|
|
|
tuple specified.
|
2015-03-02 08:50:43 -05:00
|
|
|
.It Fl u Ar var
|
2015-01-24 17:04:40 -05:00
|
|
|
Unset
|
2015-03-02 08:50:43 -05:00
|
|
|
.Ar var
|
2015-01-24 17:04:40 -05:00
|
|
|
in the environment.
|
2015-01-23 18:22:06 -05:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr printenv 1 ,
|
|
|
|
.Xr putenv 3 ,
|
|
|
|
.Xr environ 7
|
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the
|
2015-03-27 12:22:48 -04:00
|
|
|
.St -p1003.1-2013
|
2015-01-23 18:22:06 -05:00
|
|
|
specification.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Op Fl u
|
|
|
|
flag is an extension to that specification.
|