[Bug 229641] /usr/bin/printf (so also internal printf in sh) ignores width and precision in %b format
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Jul 9 13:24:09 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229641
Bug ID: 229641
Summary: /usr/bin/printf (so also internal printf in sh)
ignores width and precision in %b format
Product: Base System
Version: 11.1-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: bin
Assignee: bugs at FreeBSD.org
Reporter: cejkar at fit.vutbr.cz
/usr/bin/printf (so also internal printf in sh) ignores width and precision in
%b format. The change is since commit base r265706 (May 2014), where macro PF()
with width and precision interpretation has been replaced by direct call to
fputs(), so width and precision are ignored now.
Expected result, for example from bash:
bash$ printf "%8.2b" "a\nb\n"
a
Bad result from /usr/bin/printf and from sh:
sh$ /usr/bin/printf "%8.2b" "a\nb\n"
a
b
sh$ printf "%8.2b" "a\nb\n"
a
b
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list