2 #include "git-compat-util.h"
5 * Read stdin and print a hexdump to stdout.
7 int cmd__hexdump(int argc UNUSED
, const char **argv UNUSED
)
14 len
= xread(0, buf
, sizeof(buf
));
16 die_errno("failure reading stdin");
22 for (i
= 0; i
< len
; i
++)
23 printf("%02x ", (unsigned char)buf
[i
]);