ength of the string.
The simplest one is ${#varname}, which returns the length of the value of the va... able as a character string. For example, if filename has the value fred.c, then ${#filename} would have the value 6.
The other operator (${#array[*]}) h... g positional parameters.
echo ${@:2} # Same as above.
echo ${*:2:3} # Echoes three po
ated either as integers or strings.
# There is some blurring between the arithmetic and string compar... d value.
# This state is called "null" (not the same as zero!).
if [ -n $string1 ] # string1 has n... t's try it again.
if [ -n "$string1" ] # This time, $string1 is quoted.
then
echo "String \"string... t brackets!
echo
if [ $string1 ] # This time, $string1 stands naked.
then
echo "String \"str