Re: /usr/bin/env bash
Mark Hatle <[email protected]> Tue, 17 Aug 2004 12:27:07 -0500
| Newsgroups | gmane.linux.lsb.discuss |
|---|---|
| Organization | MontaVista Software, Inc. |
| Message-ID | <[email protected]> |
Ignoring the Unix specification issues... We use "#! /usr/bin/env bash" extensivly in our products. Why? because we have absolutly no idea where on the system the user has installed bash. By using /usr/bin/env bash, we ensure that bash is run based on the users environment and not some hard coded (somewhat arbitrary location). Same could be said for /bin/sh. (while not speaking of the LSB.. on things like Solaris and other Unix (and Unix like) systems we support, /bin/sh is often barely usable as a shell.. which is the primary reason we use the /usr/bin/env bash trick... (after of course we have provided a bash to the environment... or at least verified there is one available.) --Mark George Kraft wrote: > If I remember correctly the UNIX specifications avoid specifying lines > like "#!/bin/sh" at the beginning of a shell script. Is "/usr/bin/env" a > solution to this problem? > > http://www.research.att.com/sw/tools/uwin/man/man1/env.html > > George (gk4) > > > > ------------------------------------------------------------------------ > > _______________________________________________ > lsb-discuss mailing list > [email protected] > http://mail.freestandards.org/mailman/listinfo/lsb-discuss