use BASH_VERSION, more compatible with older versions than --version
authorHanno <hanno@gentoo.org>
Sun, 12 Oct 2014 17:31:32 +0000 (19:31 +0200)
committerHanno <hanno@gentoo.org>
Sun, 12 Oct 2014 17:31:32 +0000 (19:31 +0200)
bashcheck

index ad21c13..e9b9b2c 100755 (executable)
--- a/bashcheck
+++ b/bashcheck
@@ -16,7 +16,7 @@ tmpdir=`mktemp -d -t tmp.XXXXXXXX`
 
 [ -n "$1" ] && bash=$(which $1) || bash=$(which bash)
 echo -e "\033[95mTesting $bash ..."
-echo $($bash --version | head -n 1)
+echo Bash version $BASH_VERSION
 echo -e "\033[39m"
 
 #r=`a="() { echo x;}" $bash -c a 2>/dev/null`