From a06b5aaf21bcaed20f65ffb3f0bbd7ac6e968c7c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 23 Apr 2003 08:39:00 +0000 Subject: Fix printf POSIX compatibility bug reported by Ben Harris in . (printf invocation): It's \NNN in the format, \0NNN in the %b operand. --- doc/coreutils.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/coreutils.texi') diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 2a992dc2a..dff75cabc 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -8475,13 +8475,14 @@ all of the given @var{argument}s. @command{printf} has one additional directive, @samp{%b}, which prints its argument string with @samp{\} escapes interpreted in the same way as in -the @var{format} string. +the @var{format} string, except that octal escapes are of the form +@samp{\0@var{ooo}} where @var{ooo} is 0 to 3 octal digits. @kindex \@var{ooo} @kindex \x@var{hh} @command{printf} interprets @samp{\@var{ooo}} in @var{format} as an octal number -(if @var{ooo} is 0 to 3 octal digits) specifying a character to print, +(if @var{ooo} is 1 to 3 octal digits) specifying a character to print, and @samp{\x@var{hh}} as a hexadecimal number (if @var{hh} is 1 to 2 hex digits) specifying a character to print. -- cgit v1.2.3-54-g00ecf