03-27-2020, 09:53 AM
This command:
... unfortunately adds newlines within the hexadecimal output if a certain line line was reached. Try it yourself
The tr -d '\n' removes the newline and will guarantee that the hexadecimal output is within one line. The order of the commands in the pipe was therefore correct, but it might not be necessary because the words "guitar" etc are quite short and therefore the newline is never added.
Code:
xxd -p
... unfortunately adds newlines within the hexadecimal output if a certain line line was reached. Try it yourself
Code:
echo -n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | xxd -p
The tr -d '\n' removes the newline and will guarantee that the hexadecimal output is within one line. The order of the commands in the pipe was therefore correct, but it might not be necessary because the words "guitar" etc are quite short and therefore the newline is never added.