mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-27 11:20:58 +01:00
Mention how env(1) can be used with the "#!" construct.
PR: 27690 Submitted by: Mike Meyer <mwm@mired.org>
This commit is contained in:
parent
dd512c47f1
commit
c1a7db888d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77453
@ -101,6 +101,25 @@ If no command is specified,
|
||||
.Nm env
|
||||
prints out the names and values
|
||||
of the variables in the environment, with one name/value pair per line.
|
||||
.Pp
|
||||
.Nm env
|
||||
is sometimes useful with the
|
||||
.Qq #!
|
||||
construct (see
|
||||
.Xr execve 2 ) .
|
||||
The only difference between
|
||||
.Qq #!/usr/local/bin/foo
|
||||
and
|
||||
.Qq #!/usr/bin/env /usr/local/bin/foo
|
||||
is that the latter works even if
|
||||
.Pa /usr/local/bin/foo
|
||||
is itself interpreted.
|
||||
Using
|
||||
.Nm env
|
||||
this way also allows one to reference
|
||||
.Pa foo
|
||||
without the path,
|
||||
as well as set up the environment as desired.
|
||||
.Sh SEE ALSO
|
||||
.Xr csh 1 ,
|
||||
.Xr sh 1 ,
|
||||
|
Loading…
Reference in New Issue
Block a user