148 lines
3.7 KiB
HTML
148 lines
3.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of ENV</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>ENV</H1>
|
|
Section: User Commands (1)<BR>Updated: September 2019<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
env - run a program in a modified environment
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>env</B>
|
|
|
|
[<I>,OPTION/</I>]... [<I>,-/</I>] [<I>,NAME=VALUE/</I>]... [<I>,COMMAND /</I>[<I>,ARG/</I>]...]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
<P>
|
|
|
|
Set each NAME to VALUE in the environment and run COMMAND.
|
|
<P>
|
|
|
|
Mandatory arguments to long options are mandatory for short options too.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-i</B>, <B>--ignore-environment</B><DD>
|
|
start with an empty environment
|
|
<DT id="2"><B>-0</B>, <B>--null</B><DD>
|
|
end each output line with NUL, not newline
|
|
<DT id="3"><B>-u</B>, <B>--unset</B>=<I>,NAME/</I><DD>
|
|
remove variable from the environment
|
|
<DT id="4"><B>-C</B>, <B>--chdir</B>=<I>,DIR/</I><DD>
|
|
change working directory to DIR
|
|
<DT id="5"><B>-S</B>, <B>--split-string</B>=<I>,S/</I><DD>
|
|
process and split S into separate arguments;
|
|
used to pass multiple arguments on shebang lines
|
|
<DT id="6"><B>-v</B>, <B>--debug</B><DD>
|
|
print verbose information for each processing step
|
|
<DT id="7"><B>--help</B><DD>
|
|
display this help and exit
|
|
<DT id="8"><B>--version</B><DD>
|
|
output version information and exit
|
|
</DL>
|
|
<P>
|
|
|
|
A mere - implies <B>-i</B>. If no COMMAND, print the resulting environment.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H3>-S/--split-string usage in scripts</H3>
|
|
|
|
The
|
|
<B>-S</B>
|
|
|
|
option allows specifing multiple parameters in a script.
|
|
Running a script named
|
|
<B>1.pl</B>
|
|
|
|
containing the following first line:
|
|
<P>
|
|
|
|
<DL COMPACT><DT id="9"><DD>
|
|
<PRE>
|
|
#!/usr/bin/env -S perl -w -T
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
Will execute
|
|
<B>perl -w -T 1.pl.</B>
|
|
|
|
<P>
|
|
|
|
Without the
|
|
<B>'-S'</B>
|
|
|
|
parameter the script will likely fail with:
|
|
<P>
|
|
|
|
<DL COMPACT><DT id="10"><DD>
|
|
<PRE>
|
|
/usr/bin/env: 'perl -w -T': No such file or directory
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
See the full documentation for more details.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Written by Richard Mlynarik, David MacKenzie, and Assaf Gordon.
|
|
<A NAME="lbAH"> </A>
|
|
<H2>REPORTING BUGS</H2>
|
|
|
|
GNU coreutils online help: <<A HREF="https://www.gnu.org/software/coreutils/">https://www.gnu.org/software/coreutils/</A>>
|
|
<BR>
|
|
|
|
Report env translation bugs to <<A HREF="https://translationproject.org/team/">https://translationproject.org/team/</A>>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
Copyright © 2018 Free Software Foundation, Inc.
|
|
License GPLv3+: GNU GPL version 3 or later <<A HREF="https://gnu.org/licenses/gpl.html">https://gnu.org/licenses/gpl.html</A>>.
|
|
<BR>
|
|
|
|
This is free software: you are free to change and redistribute it.
|
|
There is NO WARRANTY, to the extent permitted by law.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
Full documentation at: <<A HREF="https://www.gnu.org/software/coreutils/env">https://www.gnu.org/software/coreutils/env</A>>
|
|
<BR>
|
|
|
|
or available locally via: info '(coreutils) env invocation'
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="11"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="12"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="13"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="14"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DL>
|
|
<DT id="15"><A HREF="#lbAF">-S/--split-string usage in scripts</A><DD>
|
|
</DL>
|
|
<DT id="16"><A HREF="#lbAG">AUTHOR</A><DD>
|
|
<DT id="17"><A HREF="#lbAH">REPORTING BUGS</A><DD>
|
|
<DT id="18"><A HREF="#lbAI">COPYRIGHT</A><DD>
|
|
<DT id="19"><A HREF="#lbAJ">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:11 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|