This was taken from another stack question that helped me out with something but there wasn't an explanation for the code and I'm not sure hwo to read it.
The problem was stripping trailing characters from a string in bash. This was one of the solutions.
foo="hello world"
echo ${foo%?}
hello worl
I'm confused why this works and how bash interprets the middle line.
I believe the ${ SOMETHING } is an evaluation, but its the "%?" that is confusing me.