mac, is have two bash versions how to change bash version code example
Example: upgrade bash version mac
brew install bash
sudo echo '/usr/local/bin/bash' >> /etc/shells
sudo chsh -s /usr/local/bin/bash
brew install bash
sudo echo '/usr/local/bin/bash' >> /etc/shells
sudo chsh -s /usr/local/bin/bash