From the bash manpage:
${parameter:offset}
${parameter:offset:length}
Substring Expansion. Expands to up to length characters of
parameter starting at the character specified by offset.
[...]
Or, if you are not sure of having bash
, consider using cut
.