filename has the value fred.c, then ${#filename} would have the value 6.
The other operator (${#arr... r characters of $a. The problem is that ${param:-word} already has a well-defined meaning: expand to word if the expanded value of param is unset or null... can be used in a variety of ways. A good example would be to give a default value to a variable norma
ching).
[ $a == z* ] # File globbing and word splitting take place.
[ "$a" == "z*" ] # Tr... e within test brackets (see Example 7-6) normally works, however, this is an unsafe practice. Always q... In this particular instance, both "-ne" and "!=" work.
echo
exit 0</code>
=== Example 7-6. Testing... "string1\" is null."
fi # This works fine.
# The [ ... ] test operator alone detect