Monday, March 22, 2010

count the number of characters

To count the number of characters contained in a variable string, use ${#varname}.


echo num of chars in stringvar is ${#stringvar}

No comments:

Post a Comment