I cannot get literal '%' in hexdump(1) output with any format_string.
Though the man page mentions exceptions in fprintf-style format,
there's no explanation why '%' cannot be printed.
Fix: a) If there's any historical reasons to be so, update the man page; to mention that literal '%' cannot be included in output.
b) fix it.
I wrote a patch, not thoroughly tested. And flag name is, perhaps, not appropriate.
How-To-Repeat: exec hexdump(1) with format_string which contains '%%' to get literal '%' in output.
$ echo foo | hexdump -e '"" /1 "%%%02x" "\n"'
hexdump: %%: bad conversion character
Patch previously submitted doesn't compile now.
Give to gcooper, he's working on this
Please try the attached patch -- or alternatively
<http://pastebin.com/f5548a625>. Be sure to check the MD5 if you use
pastebin though -- it should be:
MD5 (parse.diff) = bf969fe8de1471ad6e44a0954766d67b
Getting back to this PR...
1. Hirohisa's patch has an issue with the following input:
hexdump -e '/1 "%%%02x" "\n"'
This would translate properly using printf(3), and thus violates
this precondition noted for hexdump in the manpage.
2. My previous patch is overly noisy and should be rejected.
Still working on it...
Please try the following diff. It passes all of my unit tests, but
I just want to confirm that it passes from your end as well.
gcooper is not a developer
For bugs matching the following criteria:
Status: In Progress Changed: (is less than) 2014-06-01
Reset to default assignee and clear in-progress tags.
Mail being skipped