0

I want to convert a number to its byte equivalent. Currently I do this:

echo $((0xe0)) | hexdump -c

And I get this output:

0000000   2   2   4  \n

What I want to get is:

0000000 e0

How should I do?

michelemarcon
  • 23,277
  • 17
  • 52
  • 68

1 Answers1

1

You can try:

printf '\xe0'

echo -ne '\xe0'
kev
  • 155,172
  • 47
  • 273
  • 272