SyntaxFix
Write A Post
Hire A Developer
Questions
I know this is a very old thread, but no one mentioned which to me is the cleanest answer:
echo -n $str | tail -c 1
Note the -n is just so the echo doesn't include a newline at the end.
-n