t=lkj
echo ${t:0:${#t}-1}
You get a substring from 0 to the string length -1. Note however that this substraction is a bashishm bash specific, and won't work on other shells.
For instance, dashdash
isn't able to parse even
echo ${t:0:$(expr ${#t} - 1)}
For example, on Ubuntu, /bin/sh
is dash