Home > Software engineering >  xxd: how to simply revert without adding "00000000:"?
xxd: how to simply revert without adding "00000000:"?

Time:03-22

Sometimes I have unwanted characters in my files (DB tables, git content, etc). When I list them with xxd I have the UTF-8 code, e.g.:

e28099

I would like to know which is this character in bash, so I type:

echo -n '00000000: e28099' | xxd -r

And I will have

on the console. Is it possible not to include always those zeroes (00000000: )? So are there any params of xxd with which I could type:

echo -n 'e28099' | xxd -??? and the result will be ?

CodePudding user response:

I suggest:

echo 'e28099' | xxd -r -p

Output:

  • Related