2015-10-08 17:15:08 +02:00
|
|
|
.Dd 2015-10-08
|
2015-01-31 14:20:02 +01:00
|
|
|
.Dt ENV 1
|
2015-01-31 19:37:03 +00:00
|
|
|
.Os sbase
|
2015-01-24 00:22:06 +01:00
|
|
|
.Sh NAME
|
|
|
|
.Nm env
|
|
|
|
.Nd modify the environment, then print it or run a command
|
|
|
|
.Sh SYNOPSIS
|
2015-01-30 21:17:58 +01:00
|
|
|
.Nm
|
2015-01-24 00:22:06 +01:00
|
|
|
.Op Fl i
|
2015-03-02 14:50:43 +01:00
|
|
|
.Oo Fl u Ar var Oc ...
|
|
|
|
.Oo Ar var Ns = Ns Ar value Oc ...
|
2015-01-24 00:22:06 +01:00
|
|
|
.Oo Ar cmd Oo arg ... Oc Oc
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
|
|
|
unsets each
|
2015-03-02 14:50:43 +01:00
|
|
|
.Ar var ,
|
2015-01-24 00:22:06 +01:00
|
|
|
then adds or sets each
|
2015-03-02 14:50:43 +01:00
|
|
|
.Ar ( var , value )
|
2015-01-24 00:22:06 +01:00
|
|
|
tuple in the environment.
|
|
|
|
.Pp
|
2013-07-20 01:27:42 -04:00
|
|
|
If
|
2015-01-24 00:22:06 +01: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 14:50:43 +01:00
|
|
|
.Ar ( var , value )
|
2015-01-24 00:24:42 +01:00
|
|
|
tuple specified.
|
2015-03-02 14:50:43 +01:00
|
|
|
.It Fl u Ar var
|
2015-01-24 23:04:40 +01:00
|
|
|
Unset
|
2015-03-02 14:50:43 +01:00
|
|
|
.Ar var
|
2015-01-24 23:04:40 +01:00
|
|
|
in the environment.
|
2015-01-24 00:22:06 +01: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 17:22:48 +01:00
|
|
|
.St -p1003.1-2013
|
2015-01-24 00:22:06 +01:00
|
|
|
specification.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Op Fl u
|
|
|
|
flag is an extension to that specification.
|