I know that the question wants to avoid using awk... however there is a very elegant one-liner to do it:
trim_path=$(echo "$path" | awk '$1=$1')