env.1

来自「minix操作系统最新版本(3.1.1)的源代码」· 1 代码 · 共 94 行

1
94
字号
.TH ENV 1.SH NAMEenv \- set environment for command.SH SYNOPSIS.B env.RB [ \-ia ].RI [ name\fB=\fIvalue "] ...".RI [ utility.RI [ argument "...]]".SH DESCRIPTION.B Envmodifies its environment according to the.IB name = valuearguments, and executes.I utilitywith the given arguments and the modified environment..PPIf no utility is specified then the modified environment is printed as.IB name = valuestrings, one per line..SH OPTIONS.TP.B \-iUse exactly the environment specified by the arguments; the inheritedenvironment is ignored..TP.B \-aSpecify all arguments for the utility, i.e. the first of the arguments isused as.BR "argv[0]" ,the program name.  Normally the program name is.I utilityitself..SH ENVIRONMENT.TP 8n.B PATHThe path used to find utility.  It is as modified by.BR env ,i.e..B notthe inherited.BR PATH ..SH "SEE ALSO".BR sh (1),.BR execvp (3),.BR environ (5)..SH DIAGNOSTICSThe return code is.B 0after successfully printing the environment,.B 1on an error within.BR env ,.B 126if the.I utilitycould not be executed, or.B 127if.I utilitycould not be found.  Appropriate diagnostic messages are printed on standarderror.If.I utilitycan be executed then it replaces.BR env ,so the return code is then the return code of.IR utility ..SH NOTESWhen run from the standard shell.B envis only useful with options or without arguments.  Otherwise the shell cando exactly what.B envcan do, simply omit the word "env" on the command line..PPOne interesting use of.B envis with #! on the first line of a script to forge a PATH search for aninterpreter.  For example:.PP.RS#!/usr/bin/env perl.RE.PPThis will find the Perl interpreter if it is within the user's PATH.  MostUNIX-like systems have.B envin /usr/bin, but.B perlmay be anywhere..SH AUTHORKees J. Bot <kjb@cs.vu.nl>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?