[Top][All Lists]

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

Re: definite way to determine the running shell

From: Eric Blake
Subject: Re: definite way to determine the running shell
Date: Fri, 27 Mar 2015 08:13:14 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 03/27/2015 01:56 AM, Andreas Schwab wrote:
> Christoph Anton Mitterer <address@hidden> writes:
>> There are a lot of articles on the web about detecting the actually
>> running shell.
> Why do you need to know that?

As the autoconf world has proven, it's better to test for features (will
THIS action work?) than for versions (am I on shell XYZ version ABC?).
Rather than figuring out "is this script running under bash", focus on
"what can I test up front to learn if the rest of my script can rely on
a certain feature being present", repeated for each feature that is not
in common to all shells.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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