docs/145699: hexdump(1) mutes all format qualifier output following a %_Ax declaration

Garrett Cooper gcooper at FreeBSD.org
Wed Apr 14 13:30:01 UTC 2010


>Number:         145699
>Category:       docs
>Synopsis:       hexdump(1) mutes all format qualifier output following a %_Ax declaration
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 14 13:30:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Cooper
>Release:        9-CURRENT
>Organization:
Cisco Systems, Inc.
>Environment:
FreeBSD bayonetta.local 9.0-CURRENT FreeBSD 9.0-CURRENT #4 r206173M: Mon Apr 12 07:16:16 PDT 2010     root at bayonetta.local:/usr/obj/usr/src/sys/BAYONETTA  amd64
>Description:
The problem with the %_A qualifier is that it doesn't match the expectations delivered in the documentation don't reflect reality: 

$ echo -n "$(jot -b a 8193)" | hexdump -v -e '"%07.7_Ax\n" /1 "%s"'
0004001

I would expect 8193 "a"s to be printed, like so:

$ echo -n "$(jot -b a 8193)" | hexdump -v -e '"%07.7_Ax\n" /1 "%s"'
# ...
a
a
a
a
a
a
a
a
a
a
a
a
0004001
$

Obviously %_A isn't being evaluated at the end and is being evaluated in order of the expressions which are defined on the command line // in a file. Thus the example in the manpage is broken :(...
>How-To-Repeat:
echo "$(jot -b a 8193)" | ./hexdump -v -e '"%.7_Ax\n" /1 "%s"'
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-doc mailing list