o error message is given, print parameter null or not set. Note: In a non-interactive shell, this will abort the current s... echo \${$foo:?} one bash: bar: parameter null or not set bash: baz: parameter null or not set
== NOTE ==
The colon (:) in the above op... le would be to give a default value to a variable normally read from the command-line arguments, when no such arguments are given. This is shown in the fo... the default shell on Linux systems then there is no reason not to use these features when writing scripts for L
Testing null strings and unquoted strings,
#+ but not strings and sealing wax, not to mention cabbages and kings . . .
# Using if [ ... ]
# If a string has not been initialized, it has no defined value.
# This state is called "null" (not... # Wrong result.
# Shows $string1 as not null, although it was not initialized.
echo
# Let's try it again.
if [ ... ing \"string1\" is null."
fi # Not quoting "$string1" now gives wrong result!
exit 0
</code>
=== Exam