RosettaCodeData/Task/String-length/UNIX-Shell/string-length-1.sh
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

3 lines
113 B
Bash

string='Hello, world!'
length=`expr "x$string" : '.*' - 1`
echo $length # if you want it printed to the terminal