bug-bash
[Top][All Lists]
Advanced

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

Re: How to detect bash?


From: Dave Rutherford
Subject: Re: How to detect bash?
Date: Tue, 10 Oct 2006 17:50:42 -0400

On 10/10/06, mwoehlke <mwoehlke@tibco.com> wrote:
Anyone have any clever, VERY reliable tricks for detecting if the
current shell is bash?

Well, I don't know if it's clever, but how about:

$ if [ "${SHELL//*/bash}" = "bash" ]; then echo y; fi

But better to use the hash-bang and make SURE the shell is Bash.

Dave




reply via email to

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