diff options
author | dd <dd@FreeBSD.org> | 2001-05-30 03:15:39 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2001-05-30 03:15:39 +0000 |
commit | 6948305539c3ef2dc51bb83cbc00ef555c28d4f8 (patch) | |
tree | 981c9e67d39d496a2f8999a32cb2aaf7371124f1 /usr.bin | |
parent | affa73f3b3d2dd546707f0497bb1d6371e34f222 (diff) | |
download | FreeBSD-src-6948305539c3ef2dc51bb83cbc00ef555c28d4f8.zip FreeBSD-src-6948305539c3ef2dc51bb83cbc00ef555c28d4f8.tar.gz |
Mention how env(1) can be used with the "#!" construct.
PR: 27690
Submitted by: Mike Meyer <mwm@mired.org>
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/printenv/printenv.1 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/usr.bin/printenv/printenv.1 b/usr.bin/printenv/printenv.1 index a2912ef..4efcf04 100644 --- a/usr.bin/printenv/printenv.1 +++ b/usr.bin/printenv/printenv.1 @@ -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 , |