Consume only up to 8 bit octal input for backslash-escaped chars (echo, printf)

2010-12-07 Thread Roman Rakus
This one is already reported on coreutils: http://debbugs.gnu.org/cgi/bugreport.cgi?msg=2;bug=7574 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' Should output: 10

Re: Consume only up to 8 bit octal input for backslash-escaped chars (echo, printf)

2010-12-07 Thread Roman Rakus
Sorry for wrong indents. Patch in attachment. RR diff -up bash-4.1/builtins/printf.def.octal bash-4.1/builtins/printf.def --- bash-4.1/builtins/printf.def.octal 2010-12-07 15:40:24.0 +0100 +++ bash-4.1/builtins/printf.def2010-12-07 16:13:41.0 +0100 @@ -734,11 +734,15 @@ t

Re: Consume only up to 8 bit octal input for backslash-escaped chars (echo, printf)

2010-12-07 Thread Chet Ramey
On 12/7/10 11:12 AM, Roman Rakus wrote: > This one is already reported on coreutils: > http://debbugs.gnu.org/cgi/bugreport.cgi?msg=2;bug=7574 > > 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';

Re: Consume only up to 8 bit octal input for backslash-escaped chars (echo, printf)

2010-12-07 Thread Eric Blake
[adding the Austin Group] On 12/07/2010 06:19 PM, Chet Ramey wrote: > On 12/7/10 11:12 AM, Roman Rakus wrote: >> This one is already reported on coreutils: >> http://debbugs.gnu.org/cgi/bugreport.cgi?msg=2;bug=7574 >> >> The problem is with numbers higher than /0377; echo and printf consumes all >