https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238313
Bug ID: 238313 Summary: printf(1) man page incorrect Product: Documentation Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Manual Pages Assignee: b...@freebsd.org Reporter: deepbluemist...@gmail.com CC: d...@freebsd.org Incorrectly, the man page for printf(1) states that the \c escape works all the time. In reality, on FreeBSD, (and according to POSIX too) the \c escape only works for text meant for the %b format specifier, but not in the format itself. Actual behavior on FreeBSD (which is also correct POSIX behavior): $ /usr/bin/printf 'foo\cbar\n' foocbar $ /usr/bin/printf '%b' 'foo\cbar\n' foo$ # The above '$ ' in 'foo$ ' is from the shell, not printf. $ uname -a FreeBSD nyann.tanasinn.mochi 12.0-RELEASE-p4 FreeBSD 12.0-RELEASE-p4 GENERIC amd64 $ freebsd-version 12.0-RELEASE-p5 The solution for this would be to move the info about \c to the section about the %b format, where its own special \0 handling is also specified. Useful references: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html https://www.freebsd.org/cgi/man.cgi?query=printf&apropos=0&sektion=0&manpath=FreeBSD+12.0-RELEASE+and+Ports&arch=default&format=html -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"