Strings In Depth2 / 17
Up next

String length

#!/usr/bin/env bash
s="hello"
# ${#var} expands to the length of the value
echo "length is ${#s}"
What you're solving

${#s} gives the character count