On Fri, 2015-03-27 at 01:44 -0600, Eduardo A. Bustamante López wrote: 
> Why would the user set BASH_VERSION in the environment? That sounds like 
> asking
> for trouble!
Murphy's law! :D


> - try to unset BASHOPTS (did it work? then it's not bash)
> - Now, store the value of BASHOPTS in a temp var
> - Set a shopt option that's not set already in BASHOPTS (or unset one from
> BASHOPTS)
> - Check if the value of BASHOPTS changed.
that sounds like a nice idea.

I just thought about another "solution" myself
PATH="" shopt

then only a shell having shopt (hopefully that is just bash) should give
$?=0 .



Thanks,
Chris.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to