]> git.saurik.com Git - apple/shell_cmds.git/blame_incremental - env/env.1
shell_cmds-179.tar.gz
[apple/shell_cmds.git] / env / env.1
... / ...
CommitLineData
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
55executes
56.Ar utility
57after modifying the environment as
58specified on the command line. The option
59.Ar name=value
60specifies
61an environmental variable,
62.Ar name ,
63with a value of
64.Ar value .
65The option
66.Sq Fl i
67causes
68.Nm
69to completely ignore the environment
70it inherits.
71.Pp
72If no
73.Ar utility
74is specified,
75.Nm
76prints out the names and values
77of the variables in the environment, with one
78.Ar name=value
79pair per line.
80.Sh DIAGNOSTICS
81If the
82.Ar utility
83is invoked, the exit status of
84.Nm
85shall be the exit status of
86.Ar utility;
87otherwise, the
88.Nm
89utility exits with one of the following values:
90.Bl -tag -width Ds
91.It 0
92The
93.Nm
94utility completed successfully
95.It 1-125
96An error occurred in the
97.Nm
98utility.
99.It 126
100The utility specified by
101.Ar utility
102was found, but could not be invoked.
103.It 127
104The utility specified by
105.Ar utility
106could not be found.
107.El
108.Sh COMPATIBILITY
109The historic
110.Fl
111option 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
116The
117.Nm
118utility conforms to
119.St -p1003.2-92 .
120.Sh BUGS
121.Nm
122doesn't handle commands with equal
123.Pq Dq =
124signs in their
125names, for obvious reasons.