To remove the first character in a string:
echo $STRING |sed โ€˜s/.\(.*\)/\1/โ€™

To remove the last character in a string:
echo $STRING | sed โ€˜s/\(.*\)./\1/โ€™

To remove the last five characters in a string:
echo $STRING | sed โ€˜s/\(.*\)โ€ฆ../\1/โ€™

To remove all whitespace at the end of the line:
echo $STRING | sed โ€˜s/[ ]*$//โ€™