[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to detect bash?

From: mwoehlke
Subject: Re: How to detect bash?
Date: Wed, 11 Oct 2006 10:15:07 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060909 Thunderbird/ Mnenhy/

Paul Jarc wrote:
mwoehlke <address@hidden> wrote:
And since when does '#! /bin/bash' mean "use whatever 'bash' you
find in $PATH"? Silly me, I thought it meant "use '/bin/bash'".

Dave did say "hash-bang", but he didn't say "#! /bin/bash".  Possibly
he's thinking of "#!/usr/bin/env bash", which should do what you want.

Ah! See, I've never seen that trick. :-)
Thanks. Although it still relies on /usr/bin/env, which is *more* likely to be there than any permutation of bash, but I'd still be a little paranoid counting on it, at least until I've verified it. :-)

Actually, I must admit there is a laziness aspect; to shebang, I would have to change about a dozen scripts, whereas the current test is in one file that all others source. :-)

Will your shell have salvation? Only if it's Bourne Again.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]