1.\" Copyright (c) 1980, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the Institute of Electrical and Electronics Engineers, Inc. 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" from: @(#)printenv.1 6.7 (Berkeley) 7/28/91 35.\" $Id: env.1,v 1.4 1994/01/11 02:20:20 jtc Exp $ 36.\" 37.Dd August 27, 1993 38.Dt ENV 1 39.Os 40.Sh NAME 41.Nm env 42.Nd set and print environment 43.Sh SYNOPSIS 44.Nm env 45.Op Fl i 46.Op Ar name=value ... 47.Oo 48.Ar utility 49.Op argument ... 50.Oc 51.Sh DESCRIPTION 52.Nm env 53executes 54.Ar utility 55after modifying the environment as 56specified on the command line. The option 57.Ar name=value 58specifies 59an environmental variable, 60.Ar name , 61with a value of 62.Ar value . 63The option 64.Sq Fl i 65causes 66.Nm env 67to completely ignore the environment 68it inherits. 69.Pp 70If no 71.Ar utility 72is specified, 73.Nm env 74prints out the names and values 75of the variables in the environment, with one 76.Ar name=value 77pair per line. 78.Sh DIAGNOSTICS 79If the 80.Ar utility 81is invoked, the exit status of 82.Nm env 83shall be the exit status of 84.Ar utility; 85otherwise, the 86.Nm env 87utility exits with one of the following values: 88.Bl -tag -width Ds 89.It 0 90The 91.Nm env 92utility completed successfully 93.It 1-125 94An error occurred in the 95.Nm env 96utility. 97.It 126 98The utility specified by 99.Ar utility 100was found, but could not be invoked. 101.It 127 102The utility specified by 103.Ar utility 104could not be found. 105.El 106.Sh COMPATIBILITY 107The historic 108.Fl 109option has been deprecated but is still supported in this implementation. 110.Sh SEE ALSO 111.Xr execvp 3 , 112.Xr environ 7 113.Sh STANDARDS 114The 115.Nm env 116utility conforms to 117.St -p1003.2-92 . 118.Sh BUGS 119.Nm Env 120doesn't handle commands with equal 121.Pq Dq = 122signs in their 123names, for obvious reasons. 124