Remove the last character from a string/variable (bash) Haui 2008-08-11 12:00 Source echo ${var:0:${#var}-1} echo ${var%?} echo $var | sed 's/.$//' You could also use chop ;)