Bash Shell Scripting Language

Bash is the dominant command line terminal shell scripting language which evolved from other UNIX shell languages. We use Bash 4.4+ here at SkilStak

⚠️ Learning to program in Bash is second in importance and priority only to web development. You will use it to automate everything as you progress in technology, from your login shell, to aliases, to automation.# Bash

Checking Your Version of Bash

To check your version of bash to the following:

bash --version

If you see something like the following you are on an old version of Bash and need to update to the latest.

version 3.2.57(1)-release
...

Upgrading to the latest depends on your operating system.

Installing the Latest Bash on Mac

You really need brew to do this. If you haven’t installed brew already then do so.

brew install bash
==> Downloading https://homebrew.bintray.com/bottles/bash-5.0.7.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/07/07f1f20a0fd6a8b06cd66d9aa6bd26d4d5afe5bd79b5354b081493bb9ee28943?__gda__=exp=1558809826~hmac=f723155422694b6a867ff3bd0b1c08d4c56857b3a37a3852959eefe20b55
######################################################################## 100.0%
==> Pouring bash-5.0.7.mojave.bottle.tar.gz
==> Caveats
In order to use this build of bash as your login shell,
it must be added to /etc/shells.
==> Summary
🍺 /usr/local/Cellar/bash/5.0.7: 150 files, 9.4MB
==> brew cleanup has not been run in 30 days, running now...
Pruned 1 symbolic links and 1 directories from /usr/local

If you already have it use upgrade instead:

brew upgrade bash

Go ahead and check the version again.

bash --version