echo ${${str#?}%?} # Remove first & last chars