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