# ------------------------------------------------------------------------
# "The tools we use have a profound (and devious!) influence on our
# thinking habits, and, therefore, on our thinking abilities"
#
# -–E. W. Dijkstra
# ------------------------------------------------------------------------
#
#
# ==[ Why learning shell programming?
#
# The shell is THE user interface for UNIX systems.
# It is the only interface that is often available for servers.
# Mastering how the shell works and how to program it will help you
# understand advanced features of your system.
# Shell programs are essential for system and service configuration.
# Drawback (1): It lacks advanced programming language features.
# Drawback (2): It is an artefact of a different era, and it shows. 
#
#
# ==[ There are many shells
#
# - Thomson shell (sh), 1971
#    * First UNIX shell, written by Ken Thompson. Intentionally
#      minimalistic, with a simple command interpreter not designed for
#      programming (e.g. control flow statements are implemented as
#      separate commands) but some interesting features such as I/O
#      redirection and pipes.
# - Bourne shell (sh), 1979
#    * Written by Steve Bourne for Version 7 UNIX. Introduced most features
#      now consideered common in shells. Control flow structures are built
#      in. It is the default shell in SunOS, FreeBSD.
# - C shell (csh), 1978
#    * Written by Bill Joy for 2BSD. It has some interactive features and
#      the language syntax looks more like C. The 'tcsh' variant added more
#      feautres. It is the root shell in FreeBSD.
# - Bourne-Again shell (bash)
#    * Part of the GNU project. Superset of Bourne shell and default shell
#      for most Linux systems.
# - Z shell (zsh)
#    * Modern shell that is mostly backward compatible with bash. Default
#      shell for Kali Linux since 2020 and for macOS since 10.15.
# - Korn shell (ksh)
#    * Superset of Bourne shell developed by David Korn at Bell Labs in the
#      1980s. Default login shell for AIX, HP-UX, OpenSolaris.
# - Others: ash, dash, pdksh, ...
#
# The file /etc/shells gives an overview of known shells in your system.
# 
# Note: The shell and the terminal (emulator) are two different programs.
#
#
# ==[ This course: Bash
#
# Use Bash 5.x.
# Any of the following options should work:
#   - A native Linux distribution
#   - A Linux distribution running in a VM
#   - Windows subsystem for Linux
#   - macOS
# Note for macOS users: macOS comes with Bash 3.x (GPLv2 license).
# Apple does not provide Bash 4.x or 5.x due to GPLv3 restrictions.
# Some interesting features only available in Bash 4.x or 5.x.
# Install Bash 4.x using, e.g., Homebrew (brew install bash)
# Bash 4.x now in your path (perhaps /usr/local/bin/bash).
#
#
# ==[ References
#
# See: https://0xjet.github.io/shellp.html
