ash: printf problem interpreting octal escape sequences
Alexander Kriegisch
kriegaex at freetz.org
Sat Mar 3 23:49:31 UTC 2012
Oh, I forgot: echo -n does not have this problem:
$ echo -en '\057usr\057bin\n'
/usr/bin
$ echo -en '\0057usr\0057bin\n'
/usr/bin
Alexander Kriegisch, 04.03.2012 00:45:
> $ uname -a
> Linux fb7270 2.6.19.2 #1 Fri Feb 24 02:09:03 CET 2012 mips GNU/Linux
>
> $ busybox --help | head -n 1
> BusyBox v1.19.4 (2012-03-01 12:42:09 CET) multi-call binary.
>
> # Okay
> $ printf "%b" '\057usr\057bin\n'
> /usr/bin
>
> # Not okay
> $ printf "%b" '\0057usr\0057bin\n'
> 7usr7bin
>
> Maybe somebody can fix this? If I can provide more info, please let me know.
More information about the busybox
mailing list