Table 1:
Remove shortest length string starting from left, use #. From right? Use %.
To remove longest length string starting from left, use ##, with %% for from the right.
Table 2: The various combinations of expansions and wildcard/period placement for extracting file stem and suffix. Most do not work. To extract file name/stem from shell expansion, use %.* and to extract the suffix, use ##*.
Tired of fumbling through which is which, I made these tables to understand expansion (for my primary use case) better. Hopefully I’ll remember I left this here. #shell #scripting #shellscripting #bash #expansion