bin/145748: hexdump(1) %s format qualifier broken

Garrett Cooper gcooper at
Fri Apr 16 06:40:02 UTC 2010

>Number:         145748
>Category:       bin
>Synopsis:       hexdump(1) %s format qualifier broken
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 16 06:40:00 UTC 2010
>Originator:     Garrett Cooper
>Release:        9-CURRENT
Cisco Systems, Inc.
According to the manpage...

           o   A byte count or field precision is required for each ``s'' con-
               version character (unlike the fprintf(3) default which prints
               the entire string if the precision is unspecified).

.. this should just work. It doesn't however:

$ echo "$(jot -b a 1024)" | hexdump  -e '"%4s\n"'
hexdump: %s: requires a precision or a byte count
echo "$(jot -b a 1024)" | hexdump  -e '"%4s\n"'


More information about the freebsd-bugs mailing list