Debian Codegraph @

upstream/debian-trixie/man1/env.1

raw
1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.50.1.
2 .TH ENV "1" "June 2025" "GNU coreutils 9.7" "User Commands"
3 .SH NAME
4 env \- run a program in a modified environment
5 .SH SYNOPSIS
6 .B env
7 [\fI\,OPTION\/\fR]... [\fI\,-\/\fR] [\fI\,NAME=VALUE\/\fR]... [\fI\,COMMAND \/\fR[\fI\,ARG\/\fR]...]
8 .SH DESCRIPTION
9 .\" Add any additional description here
10 .PP
11 Set each NAME to VALUE in the environment and run COMMAND.
12 .PP
13 Mandatory arguments to long options are mandatory for short options too.
14 .TP
15 \fB\-a\fR, \fB\-\-argv0\fR=\fI\,ARG\/\fR
16 pass ARG as the zeroth argument of COMMAND
17 .TP
18 \fB\-i\fR, \fB\-\-ignore\-environment\fR
19 start with an empty environment
20 .TP
21 \fB\-0\fR, \fB\-\-null\fR
22 end each output line with NUL, not newline
23 .TP
24 \fB\-u\fR, \fB\-\-unset\fR=\fI\,NAME\/\fR
25 remove variable from the environment
26 .TP
27 \fB\-C\fR, \fB\-\-chdir\fR=\fI\,DIR\/\fR
28 change working directory to DIR
29 .TP
30 \fB\-S\fR, \fB\-\-split\-string\fR=\fI\,S\/\fR
31 process and split S into separate arguments;
32 used to pass multiple arguments on shebang lines
33 .TP
34 \fB\-\-block\-signal\fR[=\fI\,SIG\/\fR]
35 block delivery of SIG signal(s) to COMMAND
36 .TP
37 \fB\-\-default\-signal\fR[=\fI\,SIG\/\fR]
38 reset handling of SIG signal(s) to the default
39 .TP
40 \fB\-\-ignore\-signal\fR[=\fI\,SIG\/\fR]
41 set handling of SIG signal(s) to do nothing
42 .TP
43 \fB\-\-list\-signal\-handling\fR
44 list non default signal handling to stderr
45 .TP
46 \fB\-v\fR, \fB\-\-debug\fR
47 print verbose information for each processing step
48 .TP
49 \fB\-\-help\fR
50 display this help and exit
51 .TP
52 \fB\-\-version\fR
53 output version information and exit
54 .PP
55 A mere \- implies \fB\-i\fR. If no COMMAND, print the resulting environment.
56 .PP
57 SIG may be a signal name like 'PIPE', or a signal number like '13'.
58 Without SIG, all known signals are included. Multiple signals can be
59 comma\-separated. An empty SIG argument is a no\-op.
60 .SS "Exit status:"
61 .TP
62 125
63 if the env command itself fails
64 .TP
65 126
66 if COMMAND is found but cannot be invoked
67 .TP
68 127
69 if COMMAND cannot be found
70 .TP
71 \-
72 the exit status of COMMAND otherwise
73 .SH "SCRIPT OPTION HANDLING"
74 The
75 .B \-S
76 option allows specifying multiple arguments in a script.
77 Running a script named
78 .B 1.pl
79 containing the following first line:
80 .PP
81 .RS
82 .nf
83 #!/usr/bin/env \-S perl \-w \-T
84 \&...
85 .fi
86 .RE
87 .PP
88 Will execute
89 .B "perl \-w \-T 1.pl"
90 .PP
91 Without the
92 .B '\-S'
93 parameter the script will likely fail with:
94 .PP
95 .RS
96 .nf
97 /usr/bin/env: 'perl \-w \-T': No such file or directory
98 .fi
99 .RE
100 .PP
101 See the full documentation for more details.
102 .PP
103 .SH NOTES
104 POSIX's \fBexec\fP(3p) pages says:
105 .RS
106 "many existing applications wrongly assume that they start with certain
107 signals set to the default action and/or unblocked.... Therefore, it is best
108 not to block or ignore signals across execs without explicit reason to do so,
109 and especially not to block signals across execs of arbitrary (not closely
110 cooperating) programs."
111 .RE
112 .SH AUTHOR
113 Written by Richard Mlynarik, David MacKenzie, and Assaf Gordon.
114 .SH "REPORTING BUGS"
115 GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
116 .br
117 Report any translation bugs to <https://translationproject.org/team/>
118 .SH "SEE ALSO"
119 \fBsigaction\fP(2), \fBsigprocmask\fP(2), \fBsignal\fP(7)
120 .PP
121 .br
122 Full documentation <https://www.gnu.org/software/coreutils/env>
123 .br
124 or available locally via: info \(aq(coreutils) env invocation\(aq
125 .PP
126 .br
127 Packaged by Debian (9.7\-3)
128 .br
129 Copyright \(co 2025 Free Software Foundation, Inc.
130 .br
131 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
132 .br
133 This is free software: you are free to change and redistribute it.
134 .br
135 There is NO WARRANTY, to the extent permitted by law.