Search code examples
xxd

Why is xxd -r cutting off the first character of my string?


I am running the following command:

$ echo "50 40 73 73 77 30 72 64 40 31 32 33 21 21 31 32 33" | xxd -r 
@ssw0rd@123!!123

For the life of me I don't know why the output does not start with 'P'


Solution

  • according to the man the first number is expected to be "line number" which is skipped

    Using xxd -r -p fixes this