For others not aware of this functionality, it is a well documented and old bash feature:
https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.ht...
If you want to go deeper into the weeds, the parameter substitution bits are also very useful:
https://www.tldp.org/LDP/abs/html/parameter-substitution.htm...
For others not aware of this functionality, it is a well documented and old bash feature:
https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.ht...
If you want to go deeper into the weeds, the parameter substitution bits are also very useful:
https://www.tldp.org/LDP/abs/html/parameter-substitution.htm...