take last character of string in shell code example
Example: shell substring last characters
echo -n $str | tail -c 1
# gets the last character, increase number to get more characters
echo -n $str | tail -c 1
# gets the last character, increase number to get more characters