Bash supports a surprising number of string manipulation
operations. Unfortunately, these tools lack
a unified focus. Some are a subset of parameter substitution, and
others fall under the functionality of the UNIX expr command. This results in
inconsistent command syntax and overlap of functionality,
not to mention confusion.
bash substring offset specification