get first x characters of string bash code example Example: bash get first n characters echo ${FOO:0:10}