bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Bash bug interpolating delete characters


From: Chet Ramey
Subject: Fwd: Bash bug interpolating delete characters
Date: Thu, 03 May 2012 08:43:46 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:11.0) Gecko/20120327 Thunderbird/11.0.1

--- Begin Message ---
Hi,

please try the following bash script:

a=x
del="$(echo -e "\\x7f")"

echo "$del${a#x}" | od -ta
echo "$del ${a#x}" | od -ta
echo " $del${a#x}" | od -ta

Using bash 3.2, the output is:

0000000 del  nl
0000002
0000000 del  sp  nl
0000003
0000000  sp del  nl
0000003

however with bash 4.1 and bash 4.2.20, the output is only:

0000000 del  nl
0000002
0000000  sp  nl
0000002
0000000  sp  nl
0000002

... so in the second and third line, the delete character magically 
disappears. Neither OS nor locale seem to influence this. Using a delete 
character directly in the script instead of $del also has no impact, 
either.

Feel free to post this to gnu.bash.bug - unfortunately I don't have a spam 
protected email address at hand right now.

Thanks for looking at this!

Yours, RĂ¼diger.

The information included in this e-mail and any files transmitted with it is 
strictly confidential and may be privileged or otherwise protected from 
disclosure. If you are not the intended recipient, please notify the sender 
immediately by e-mail and delete this e-mail as well as any attachment from 
your system. If you are not the intended recipient you are not authorized to 
use and/or copy this message and/or attachment and/or disclose the contents to 
any other person.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]