I am trying to create shell scripts that make use of Bash 4.0's features. I am on a Mac using zshell as my main shell, and I have bash 4.0 installed via Homebrew.
When I run bash --version
from iTerm, I get:
GNU bash, version 4.4.23(1)-release (x86_64-apple-darwin17.5.0)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
But if I try to execute echo "Using $BASH_VERSION"
from within my script, I get: Using version 3.2.57(1)-release
How do I get my virtual shell for my scripts to point to Bash 4.0?