PeterVandivier
The default macOS install of bash is 3.2. `brew install bash` currently installs bash 5. How do you install bash 4?
Top Answer
James Douglas
1. Find the bash formula commit history: https://github.com/Homebrew/homebrew-core/commits/master/Formula/bash.rb
1. Find the latest commit that uses bash 4, for example: [`bash: update 4.4.23 bottle.`](https://github.com/Homebrew/homebrew-core/commit/32353d2286f850fd965e0a48bcf692b83a6e9a41#diff-2cea517cfd3d25f71d3e5c418b057798) and click "Browse files"
1. Navigate to [Formula/bash.rb](https://github.com/Homebrew/homebrew-core/blob/32353d2286f850fd965e0a48bcf692b83a6e9a41/Formula/bash.rb), and click "Raw"
1. Copy the URL, and run `brew install <url>` so for example:
```
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/32353d2286f850fd965e0a48bcf692b83a6e9a41/Formula/bash.rb
```
And that should install bash version 4.4.
---
Based off answer to SO question [Homebrew install specific version of formula?](https://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula/7787703#7787703)