h returns the length of the value of the variable as a character string. For example, if filename has ... ositional parameters.
echo ${@:2} # Same as above.
echo ${*:2:3} # Echoes three posit... n. There are four substitution operators in bash, as shown in the following table.
Operator Function ... IX utility basename(1). basename takes a pathname as argument and returns the filename only; it is mea
=4
b=5
# Here "a" and "b" can be treated either as integers or strings.
# There is some blurring be... alue.
# This state is called "null" (not the same as zero!).
if [ -n $string1 ] # string1 has not ... # Wrong result.
# Shows $string1 as not null, although it was not initialized.
echo
... ood practice to quote it (if [ "$string1" ]).
#
# As Stephane Chazelas points out,
# if [ $string1