====== String Operations in Bash/Shell ======
Quelle((http://www.softpanorama.org/Scripting/Shellorama/Reference/string_operations_in_shell.shtml))
===== Length Operator =====
There are t... oo
one
${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:+bar}
ba... . If no error message is given, print parameter null or not set. Note: In a non-interactive shell, this will abort the current script. In an interactive shell... re is a section on Parameter Substitution which tells us that $foo is really a shorthand for ${foo} which is really the simplest case of several ${foo:operators} an
lized, it has no defined value.
# This state is called "null" (not the same as zero!).
if [ -n $string1 ] ... ? # Script returns exit status of pipe.
# Actually "exit $?" is unnecessary, as the script will, in any case,
#+ return the exit status of the la