Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 451 Bytes

File metadata and controls

20 lines (13 loc) · 451 Bytes

Length of String in Variable

We can get the length of string stored in a variable by writing variable name in following syntax -

${#Variable_Name}

Example

VAR="String"
echo "Size of variable 'VAR' is = ${#VAR}"

Source: StackOverFlow

Reference(s)