I have discovered how to get my string in bash as lower case:
> multi_case='MULTIcaseSTRING'
> echo ${multi_case,,}
multicasestring
...and how to get the last two letters of the string:
> echo ${multi_case:(-2)}
NG
... but I don't know how to combine them.
How do I get the last two letters in lowercase? If it helps, I know that the string will always be two to five chars long.
Ideally, I'm looking for a fairly short one-liner.