I have a diff attached which fixes the man page.
On Mon, Jun 3, 2019 at 2:12 PM Andras Farkas <[email protected]> wrote: > > https://man.openbsd.org/man1/printf.1 > The section on the b format (%b) neglects to mention that for that > format, it's \0num rather than \num > Because of the way OpenBSD's printf is made, both \0num and \num work > for %b, but, \0num is more correct and portable when using printf(1)'s > %b format. > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html > > For comparison: > https://www.freebsd.org/cgi/man.cgi?query=printf&apropos=0&sektion=1&manpath=FreeBSD+12.0-RELEASE+and+Ports&arch=default&format=html > https://netbsd.gw.com/cgi-bin/man-cgi?printf+1
Index: printf.1 =================================================================== RCS file: /cvs/src/usr.bin/printf/printf.1,v retrieving revision 1.32 diff -u -p -r1.32 printf.1 --- printf.1 2 Jun 2019 06:16:37 -0000 1.32 +++ printf.1 30 Jul 2019 03:51:32 -0000 @@ -328,6 +328,13 @@ all remaining characters in this argumen and all remaining characters in the .Ar format string. +The string +.Ar argument +uses +.Cm \e0 Ns Ar num +rather than +.Cm \e Ns Ar num +for octal escapes. .It Cm c The first character of .Ar argument
