est possible match from the right export $foo="thisis a test" echo ${foo%%t*is}
NOTE
While the # and % identifiers may not see... rator Function Example
${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 $foo
${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 expo... :=one}
one
echo $foo
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="thisis
is equal to
<code>if [ "$a" == "$b" ]</code>
Thisis a synonym for =.
Note
The == comparison op... truct.
See Example 27-11 for an application of this comparison operator.
----
-z
string is null, that is, has zero length
<code>
String='' # Zero-length ("null") string vari... kets (see Example 7-6) normally works, however, thisis an unsafe practice. Always quote a tested string.