${foo:-bar} If $foo exists and is not null, return $foo. If it doesn't exist or is null, return bar. export foo=""
echo ${foo:-one}
one
echo $fo...
${foo:=bar} If $foo exists and is not null, return $foo. If it doesn't exist or is null, set $foo to bar and return bar export foo=""
echo ${foo:=one}
one
echo $foo...
${foo:+bar} If $foo exists and is not null, return bar. If it doesn't exist, or is null, return a null. export foo="this is a test"
echo ${foo:+... name:-word}
If varname exists and isn't null, return its value; otherwise return word.
Purpose:
Returning a default value if t
# Error message to stderr.
exit $E_NOARGS
# Returns 65 as exit status of script (error code).
fi
... bstitute 'less' if desired.
exit $? # Script returns exit status of pipe.
# Actually "exit $?" is unnecessary, as the script will, in any case,
#+ return the exit status of the last command executed.
</c... comparison ====
-a
logical and
exp1 -a exp2 returns true if both exp1 and exp2 are true.
----
-o
lo