Below example pipes a string of 3 characters to hexdump: backspace (x08) newline (x0a) and form feed (x0c)
Hexdump's "%_u" format translates this string correctly to bs lf and ff
However the "%_c" format translates it to \b \n and \b
And that's wrong. The backslash escape sequence of form feed is \f and not \b
My BusyBox version v1.21.0. may be too old. Has this been corrected? Does this bug exist in the full version (which I don't have)?
Code: Select all
#!/bin/bash
echo -en "\x08\x0A\x0C" | hexdump -e '1 "%_u\n"'
echo
echo -en "\x08\x0A\x0C" | hexdump -e '1 "%_c\n"'