Commit | Line | Data |
---|---|---|
12edb72b C |
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 | .\" | |
e013f768 C |
34 | .\" from: @(#)printenv.1 6.7 (Berkeley) 7/28/91 |
35 | .\" $Id: env.1,v 1.3 1993/08/28 04:19:10 jtc Exp $ | |
12edb72b | 36 | .\" |
e013f768 | 37 | .Dd August 27, 1993 |
12edb72b C |
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 | |
e013f768 | 48 | .Ar utility |
12edb72b C |
49 | .Op argument ... |
50 | .Oc | |
51 | .Sh DESCRIPTION | |
52 | .Nm env | |
53 | executes | |
e013f768 | 54 | .Ar utility |
12edb72b C |
55 | after modifying the environment as |
56 | specified on the command line. The option | |
57 | .Ar name=value | |
58 | specifies | |
59 | an environmental variable, | |
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 | |
e013f768 | 71 | .Ar utility |
12edb72b C |
72 | is specified, |
73 | .Nm env | |
74 | prints out the names and values | |
e013f768 C |
75 | of the variables in the environment, with one |
76 | .Ar name=value | |
77 | pair per line. | |
12edb72b C |
78 | .Sh DIAGNOSTICS |
79 | If the | |
e013f768 | 80 | .Ar utility |
12edb72b C |
81 | is invoked, the exit status of |
82 | .Nm env | |
83 | shall be the exit status of | |
e013f768 | 84 | .Ar utility; |
12edb72b C |
85 | otherwise, the |
86 | .Nm env | |
e013f768 | 87 | utility exits with one of the following values: |
12edb72b C |
88 | .Bl -tag -width Ds |
89 | .It 0 | |
90 | The | |
91 | .Nm env | |
e013f768 | 92 | utility completed successfully |
12edb72b | 93 | .It 1-125 |
e013f768 C |
94 | An error occured in the |
95 | .Nm env | |
96 | utility. | |
12edb72b | 97 | .It 126 |
e013f768 C |
98 | The utility specified by |
99 | .Ar utility | |
12edb72b C |
100 | was found, but could not be invoked. |
101 | .It 127 | |
e013f768 C |
102 | The utility specified by |
103 | .Ar utility | |
12edb72b C |
104 | could not be found. |
105 | .El | |
e013f768 C |
106 | .Sh COMPATIBILITY |
107 | The historic | |
108 | .Fl | |
109 | option has been deprecated but is still supported in this implementation. | |
12edb72b C |
110 | .Sh SEE ALSO |
111 | .Xr execvp 3 , | |
112 | .Xr environ 7 | |
113 | .Sh STANDARDS | |
114 | The | |
115 | .Nm env | |
e013f768 C |
116 | utility conforms to |
117 | .St -p1003.2-92 . | |
12edb72b | 118 | .Sh BUGS |
e013f768 C |
119 | .Nm Env |
120 | doesn't handle commands with equal | |
121 | .Pq Dq = | |
122 | signs in their | |
12edb72b | 123 | names, for obvious reasons. |