I am using the following command to read the output of one terminal from another terminal:

xxd -p /dev/pts/0

But there is no spaces between the hex values, for example I get something like this:


Instead of this:

61 62 61 62
  • 1
    How about od -An -vtx1? – cuonglm Nov 20 '17 at 3:56

If you're open to bringing in other tools then one possibility is to send output through sed:

xxd -p /dev/pts/0 | sed 's/../& /g'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.