$BASH_VERSION reports old version of bash on macOS, is this a problem that should be fixed?

后端 未结 3 638
闹比i
闹比i 2020-12-03 23:04

I have homebrew\'s bash package installed. When I open a new shell:

bash --version gives GNU bash, version 5.0.7(1)-release (x86_64-apple-darwin18

3条回答
  •  醉酒成梦
    2020-12-04 00:00

    Your login shell (see echo $SHELL) is probably /bin/bash and that is the one setting $BASH_VERSION. If you need to use a specific version in scripts, use the full path in the #! line.

提交回复
热议问题