We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Summary: Version Detection like checking $BASH_VERSION or User-Agent == "Mozilla" is bad for portability.
$BASH_VERSION
User-Agent == "Mozilla"
TODO: Fill out this page more.
NOTE: OSH won't pretend it's bash! It is largely compatible with bash, but not identical.
In shell (or JavaScript), an easy and effective way is to use eval. (This is perhaps the best justification for eval !
eval
For example, you can test if a shell has local with something like eval 'local myvar'; echo $?.
local
eval 'local myvar'; echo $?