Andrew Reilly <[EMAIL PROTECTED]> types:
> On Mon, Jun 04, 2001 at 12:52:57AM +0100, Mark Valentine wrote:
> > By the way, who uses env(1) anyway? In the past twenty years, I've only
> > ever used it as shorthand for printenv(1). What's this csh(1) thing? :-)
> How else do you throw away your environment, to make sure that
> daemons that you start with sudo don't do anything silly?
I think it's more commonly used in scripts, so you don't have to worry
about where the interpreter is installed. The python folks are
recommending the user of "#!/usr/bin/env python" instead of
"#!/usr/local/bin/python" for scripts, since the former works no
matter where python is installed. I understand that some of the perl
installation scripts use the same trick.
Even cooler - at least as far as I'm concerned - is that you can do
this if your interpreter is a script. That is, where
"#!/usr/local/bin/foobar" won't work because foobar is a Perl script,
"#!/usr/bin/env foobar" will work just fine.
This is documented on the env man page, though I don't think it's been
MFC'ed yet.
<mike
--
Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message