Finally checked in fix for route printing bug that I introduced which was
[unix-history] / usr.bin / env / env.1
CommitLineData
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
53executes
e013f768 54.Ar utility
12edb72b
C
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
e013f768 71.Ar utility
12edb72b
C
72is specified,
73.Nm env
74prints out the names and values
e013f768
C
75of the variables in the environment, with one
76.Ar name=value
77pair per line.
12edb72b
C
78.Sh DIAGNOSTICS
79If the
e013f768 80.Ar utility
12edb72b
C
81is invoked, the exit status of
82.Nm env
83shall be the exit status of
e013f768 84.Ar utility;
12edb72b
C
85otherwise, the
86.Nm env
e013f768 87utility exits with one of the following values:
12edb72b
C
88.Bl -tag -width Ds
89.It 0
90The
91.Nm env
e013f768 92utility completed successfully
12edb72b 93.It 1-125
e013f768
C
94An error occured in the
95.Nm env
96utility.
12edb72b 97.It 126
e013f768
C
98The utility specified by
99.Ar utility
12edb72b
C
100was found, but could not be invoked.
101.It 127
e013f768
C
102The utility specified by
103.Ar utility
12edb72b
C
104could not be found.
105.El
e013f768
C
106.Sh COMPATIBILITY
107The historic
108.Fl
109option 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
114The
115.Nm env
e013f768
C
116utility conforms to
117.St -p1003.2-92 .
12edb72b 118.Sh BUGS
e013f768
C
119.Nm Env
120doesn't handle commands with equal
121.Pq Dq =
122signs in their
12edb72b 123names, for obvious reasons.