Mention how env(1) can be used with the "#!" construct.

PR:		27690
Submitted by:	Mike Meyer <mwm@mired.org>
This commit is contained in:
Dima Dorfman 2001-05-30 03:15:39 +00:00
parent dd512c47f1
commit c1a7db888d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77453

View File

@ -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 ,