Bash Bash Parameter Expansion Delete a pattern from the beginning of a string


Example

Shortest match:

$ a='I am a string'
$ echo "${a#*a}"
m a string

Longest match:

$ echo "${a##*a}"
 string