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