[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Consume only up to 8 bit octal input for backslash-escaped chars (ec
Re: Consume only up to 8 bit octal input for backslash-escaped chars (echo, printf)
Thu, 09 Dec 2010 09:53:52 +0100
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:220.127.116.11) Gecko/20101027 Fedora/3.1.6-1.fc13 Lightning/1.0b3pre Thunderbird/3.1.6
On 12/08/2010 02:19 AM, Chet Ramey wrote:
On 12/7/10 11:12 AM, Roman Rakus wrote:
This one is already reported on coreutils:
The problem is with numbers higher than /0377; echo and printf consumes all
3 numbers, but it is not 8-bit number. For example:
$ echo -e '\0610'; printf '\610 %b\n' '\610 \0610'
10 10 10
� � �
No, it shouldn't. This is a terrible idea. All other shells I tested
behave as bash does*, bash behaves as Posix specifies, and the bash
behavior is how C character constants work. Why would I change this?
Just wanted to work as coreutils. But ok, you can choose ;)
(*That is, consume up to three octal digits and mask off all but the lower
8 bits of the result.)
Yep. Nothing against this.