Mac OS X, Mac OS X Server, Programming Quickly read the length of a string in bash April 9, 2018 Quick little script to read the length of a string: #!/bin/bash echo "Enter some text"read mytextlength=${#mytext}echo $length