2

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:

61626162

Instead of this:

61 62 61 62
Tom
  • 123
  • 1
  • 11

1 Answers1

2

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'
B Layer
  • 5,107
  • 1
  • 17
  • 34