> Yours, RĂ¼diger.
> a=x
> del="$(echo -e "\\x7f")"
>
> echo "$del${a#x}" | od -ta
> echo "$del ${a#x}" | od -ta
> echo " $del${a#x}" | od -ta
Yup, confirmed that it breaks here, and only when the # parameter expansion
is included.
imadev:~$ del=$'\x7f' a=x b=
imadev:~$ echo " $del$b" | od -ta
0000000 sp del nl
0000003
imadev:~$ echo " $del${b}" | od -ta
0000000 sp del nl
0000003
imadev:~$ echo " $del${b#x}" | od -ta
0000000 sp del nl
0000003
imadev:~$ echo " $del${a#x}" | od -ta
0000000 sp nl
0000002
Bash 4.2.24.