# ==[ Shell scripts
#
# -- Interactive and non-interactive shells
#
# We will study this topic in more depth later.
# An interactive shell is one whose input and output is connected to a
# terminal. (This is not entirely true, but will suffice for the time
# being.)
# You can check if a shell is interactive by checking if '$-' contains the
# option 'i' or if '$PS1' (the prompt) is unset.
# Interactive shells behave differently from non-interactive shells: they
# read startup configuration files, job control is enabled, prompt behavior
# is managed by the 'PSn' variables, it will not exit when errors occur,
# etc. 
# 
# -- Shell scripts
#
# A shell script is a text file containing shell commands.
# When a script is passed as first argument to a shell without -c o -s
# options, the script is executed in a newly created non-interactive shell.
# The shell also changes special parameter 0 to contain the name of the
# script instead of the name of the shell, and the remaining parameters
# contain the arguments.
# Scripts can be run by invoking them if they are executable and if contain
# a shebang.
# Alternatively you can run them by passing them as first argument of the
# shell.
