We can get the length of string stored in a variable by writing variable name in following syntax -
${#Variable_Name}
$ VAR="String" $ echo "Size of variable 'VAR' is = ${#VAR}"
Source: StackOverFlowarrow-up-right
Reference(s)
Bash Reference Manualarrow-up-right
Last updated 1 year ago