|
From: | mwoehlke |
Subject: | Re: How to detect bash? |
Date: | Wed, 11 Oct 2006 10:22:22 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.0 |
Ramprasad wrote:
On Wed, 2006-10-11 at 02:38, mwoehlke wrote:Anyone have any clever, VERY reliable tricks for detecting if the current shell is bash?Hope, i think you can get from `/proc/$$/exe' ?
That would only work on systems that have /proc/$$/exe. Some of the systems I'm running on (HP-UX, for example) don't even have /proc.
(As a general comment to the replies I've seen:)I guess I am looking for a test that only uses shell built-ins. Anything else makes assumptions about the environment and system that can't always be counted on.
-- Matthew Will your shell have salvation? Only if it's Bourne Again.
[Prev in Thread] | Current Thread | [Next in Thread] |