Mac: Virtual Shell Bash Version does not Match Installed Version [duplicate]
问题 This question already has answers here : Associative arrays: error “declare: -A: invalid option” (10 answers) Closed 2 years ago . 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