It is behaving as expected according to my reading.  hd isn't just a
synonym for hexdump, it's hexdump plus the -C option.  You can give
hd/hexdump multiple options to format the same bit of data more than
once.

hexdump without -C:

    $ echo foo | hexdump -vce '4/1 "[%x] " "\n"'
    0000000   f   o   o  \n
    [66] [6f] [6f] [a]
    0000004
    $

Add -C:

    $ echo foo | hexdump -vCce '4/1 "[%x] " "\n"'
    00000000  66 6f 6f 0a                                       |foo.|
    0000000   f   o   o  \n
    [66] [6f] [6f] [a]
    0000004
    $

Drop -C, switch to hd:

    $ echo foo | hd -vce '4/1 "[%x] " "\n"'
    00000000  66 6f 6f 0a                                       |foo.|
    0000000   f   o   o  \n
    [66] [6f] [6f] [a]
    0000004
    $

The second and third give the same output.  hd(1) says

    -C  ...
        Calling the command hd implies this option.
        
And it does.  you simply must use hexdump, not hd, if you don't want -C
in addition to the other output you specify.

-- 
hexdump invoked as hd prints extra
https://bugs.launchpad.net/bugs/363201
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to