lets define a variable first,
# TEST=1234567890
to find the length of variable TEST,
# echo ${#TEST}
10
its possible to assign the length to a new variable, say LENGTH
# LENGTH=${#TEST}
# echo $LENGTH
10
now try to find the length of the following variable,
# TEST="my length is"
Technorati Tags:
linux,
bash