User Tools

Site Tools


bash:strings:get_length_of_a_string

BASH - Strings - Get Length of a String

var="abc de"
 
echo ${#var}

returns:

6

NOTE: The returned length includes any spaces.

bash/strings/get_length_of_a_string.txt · Last modified: 2021/01/13 21:49 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki