Bash
Bash (Bourne-Again shell) is a scripting language for unix operating systems, developed in 1989. It is run as a modern version of the bourne shell /bin/sh/, developed in 1976.
Needs to start file with a shebang which is a sharp + hashtag (!#)
$ !# /bin/env bash # tested and didn't work once, reverted to /bin/sh
$ !# /bin/bash
$ !# /bin/sh
Then if the script is run as a stand-alone program in cmdline, you must give it execuable permissions
$ chmod +x .example.sh
Documentation
- Poorly written official docs: https://www.gnu.org/software/bash/manual/?
Untested recommended docs from Chatgpt
- https://support.apple.com/guide/terminal/welcome/mac
- https://www.redhat.com/en/blog/bash-scripting-loops