Skip site navigation (1)Skip section navigation (2)
Date:      27 May 2001 17:44:35 -0000
From:      mwm@mired.org
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   docs/27690: [PATCH] env is cool, and should be better documented.
Message-ID:  <20010527174435.6153.qmail@guru.mired.org>

next in thread | raw e-mail | index | archive | help

>Number:         27690
>Category:       docs
>Synopsis:       [PATCH] env is cool, and should be better documented.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 27 10:50:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Mike Meyer
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
Meyer consulting
>Environment:
System: FreeBSD guru.mired.org 4.3-STABLE FreeBSD 4.3-STABLE #17: Sun May 27 08:47:01 CDT 2001 mwm@guru.mired.org:/sharetmp/obj/usr/src/sys/GURU i386


>Description:
	env actually has some cool applications, but the man page doesn't
	mention a single possible use. So add one.

>How-To-Repeat:
	Play with env a bit, and figure out how useful it is. Read the man
	page and notice that none of this is documented.

>Fix:

	Apply the attached patch to the printenv man page.

--- usr.bin/printenv/printenv.1	Tue Dec 19 10:22:24 2000
+++ /tmp/printenv.1	Sun May 27 10:22:49 2001
@@ -101,6 +101,20 @@
 .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 most useful with the
+.Li #!
+construct. The only difference between
+.Li "#! /usr/local/bin/foo"
+and
+.Li "#! /usr/bin/env /usr/local/bin/foo"
+is that the latter works even if
+.Pa /usr/local/bin/foo
+is itself scripted. The facilities of env allow reference to
+.Ic foo
+without the path,
+and allow the script author to set up environment variables as needed.
 .Sh SEE ALSO
 .Xr csh 1 ,
 .Xr sh 1 ,

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010527174435.6153.qmail>