Stringlength (Bash)
Naar navigatie springen
Naar zoeken springen
Drie verschillende manieren om de lengte van een string te bepalen:
stringZ=abcABC123ABCabc echo ${#stringZ} # 15 echo `expr length $stringZ` # 15 echo `expr "$stringZ" : '.*'` # 15
Bron: https://www.tldp.org/LDP/abs/html/string-manipulation.html