don't bother resolving onbld python module deps
[unleashed.git] / bin / env / env.1
blob864cee2e44abff49157b745dbc60513d6c6b77a8
1 .\"
2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\"
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document.  The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
30 .\"
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
35 .\"
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
41 .\"
42 .\"
43 .\" Copyright 1989 AT&T
44 .\" Copyright (c) 1992, X/Open Company Limited.  All Rights Reserved.
45 .\" Portions Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved.
46 .\"
47 .TH ENV 1 "Oct 25, 2017"
48 .SH NAME
49 env \- set environment for command invocation
50 .SH SYNOPSIS
51 .LP
52 .nf
53 \fB/usr/bin/env\fR [\fB-i\fR | \fB-\fR] [\fIname=value\fR]...
54      [\fIutility\fR [\fIarg\fR... ]]
55 .fi
57 .SH DESCRIPTION
58 .sp
59 .LP
60 The \fBenv\fR utility obtains the current environment, modifies it according to
61 its arguments, then invokes the utility named by the \fIutility\fR operand with
62 the modified environment.
63 .sp
64 .LP
65 Optional arguments are passed to \fIutility\fR. If no \fIutility\fR operand is
66 specified, the resulting environment is written to the standard output, with
67 one \fIname\fR\fB=\fR\fIvalue\fR pair per line.
68 .sp
69 .LP
70 If \fBenv\fR executes commands with arguments, it uses the default shell
71 \fB/usr/bin/sh\fR (see \fBsh\fR(1)).
72 .SH OPTIONS
73 .sp
74 .LP
75 The following options are supported:
76 .sp
77 .ne 2
78 .na
79 \fB\fB-i\fR | \fB\(mi\fR \fR
80 .ad
81 .RS 14n
82 Ignores the environment that would otherwise be inherited from the current
83 shell.  Restricts the environment for \fIutility\fR to that specified by the
84 arguments.
85 .RE
87 .SH OPERANDS
88 .sp
89 .LP
90 The following operands are supported:
91 .sp
92 .ne 2
93 .na
94 \fB\fIname\fR\fB=\fR\fIvalue\fR \fR
95 .ad
96 .RS 15n
97 Arguments of the form \fIname\fR\fB=\fR\fIvalue\fR modify the execution
98 environment, and are placed into the inherited environment before \fIutility\fR
99 is invoked.
103 .ne 2
105 \fB\fIutility\fR \fR
107 .RS 15n
108 The name of the utility to be invoked.  If \fIutility\fR names any of the
109 special shell built-in utilities, the results are undefined.
113 .ne 2
115 \fB\fIarg\fR \fR
117 .RS 15n
118 A string to pass as an argument for the invoked utility.
121 .SH EXAMPLES
123 \fBExample 1 \fRInvoking utilities with new PATH values
126 The following utility:
129 .in +2
131 example% \fBenv -i PATH=/mybin mygrep xyz myfile \fR
133 .in -2
138 invokes the utility \fBmygrep\fR with a new \fBPATH\fR value as the only entry
139 in its environment. In this case, \fBPATH\fR is used to locate \fBmygrep\fR,
140 which then must reside in \fB/mybin\fR.
142 .SH ENVIRONMENT VARIABLES
145 See \fBenviron\fR(5) for descriptions of the following environment variables
146 that affect the execution of \fBenv\fR: \fBLANG\fR, \fBLC_ALL\fR,
147 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
149 .ne 2
151 \fB\fBPATH\fR\fR
153 .RS 8n
154 Determine the location of the \fIutility\fR. If \fBPATH\fR is specified as a
155 \fIname\fR=\fIvalue\fR operand to \fBenv\fR, the value given shall be used in
156 the search for \fIutility\fR.
159 .SH EXIT STATUS
162 If \fIutility\fR is invoked, the exit status of \fBenv\fR is the exit status of
163 \fIutility\fR. Otherwise, the \fBenv\fR utility returns one of the following
164 exit values:
166 .ne 2
168 \fB\fB0\fR \fR
170 .RS 10n
171 Successful completion.
175 .ne 2
177 \fB\fB1-125\fR \fR
179 .RS 10n
180 An error occurred.
184 .ne 2
186 \fB\fB126\fR \fR
188 .RS 10n
189 \fIutility\fR was found but could not be invoked.
193 .ne 2
195 \fB\fB127\fR \fR
197 .RS 10n
198 \fIutility\fR could not be found.
201 .SH ATTRIBUTES
204 See \fBattributes\fR(5) for descriptions of the following attributes:
205 .SS "/usr/bin"
210 box;
211 c | c
212 l | l .
213 ATTRIBUTE TYPE  ATTRIBUTE VALUE
215 CSI     enabled
217 Interface Stability     Standard
220 .SH SEE ALSO
223 \fBksh\fR(1), \fBsh\fR(1), \fBexec\fR(2), \fBprofile\fR(4),
224 \fBattributes\fR(5), \fBenviron\fR(5), \fBstandards\fR(5)