]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Fix printf POSIX compatibility bug reported by Ben Harris in
authorJim Meyering <jim@meyering.net>
Wed, 23 Apr 2003 08:39:00 +0000 (08:39 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 23 Apr 2003 08:39:00 +0000 (08:39 +0000)
<http://mail.gnu.org/archive/html/bug-coreutils/2003-04/msg00070.html>.

(printf invocation): It's \NNN in the format,
\0NNN in the %b operand.

doc/coreutils.texi

index 2a992dc2adfda538c97be8be4bed831edd39b060..dff75cabce5c5ae6f36dea14b15ea7689df0444f 100644 (file)
@@ -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.