x='\\\\' printf Nothing:'%s\n' ${x#'\\\\'} printf Nothing:'%s\n' "${x#'\\\\'}" echo Ok:$?