bug-bash
[Top][All Lists]
Advanced

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

Re: definite way to determine the running shell


From: Dan Douglas
Subject: Re: definite way to determine the running shell
Date: Fri, 27 Mar 2015 14:31:25 -0500

I just test for version strings. e.g. BASH_VERSION. It isn't ideal or
robust but gets the job done depending on your requirements. There is
no generally great solution.

There are scripts that make better guesses but there aren't any that
are meant for use in a library or that do fine-grained feature
detection. Something like that is on my todo list for some day.

https://www.mirbsd.org/cvs.cgi/contrib/code/Snippets/getshver?rev=HEAD
http://www.in-ulm.de/~mascheck/various/whatshell/whatshell.sh.html
http://stchaz.free.fr/which_interpreter

-- 
Dan Douglas



reply via email to

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