echo ${var%.hr/} http://wiki.plecko