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
A commit references this bug: Author: jilles Date: Mon Jul 29 20:43:08 UTC 2019 New revision: 350425 URL: https://svnweb.freebsd.org/changeset/base/350425 Log: printf(1): Note that \c only works in %b strings PR: 238313 Reported by: Andras Farkas MFC after: 1 week Changes: head/usr.bin/printf/printf.1
A commit references this bug: Author: jilles Date: Mon Aug 5 20:19:38 UTC 2019 New revision: 350613 URL: https://svnweb.freebsd.org/changeset/base/350613 Log: MFC r350425: printf(1): Note that \c only works in %b strings PR: 238313 Changes: _U stable/12/ stable/12/usr.bin/printf/printf.1
A commit references this bug: Author: jilles Date: Mon Aug 5 20:21:35 UTC 2019 New revision: 350615 URL: https://svnweb.freebsd.org/changeset/base/350615 Log: MFC r350425: printf(1): Note that \c only works in %b strings PR: 238313 Changes: _U stable/11/ stable/11/usr.bin/printf/printf.1
Fixed, thanks for the report.