Hi Bob!

> Is there any way to use the shell printf like the C printf and do this conversion in the coreutils printf? Or perhaps another way?

I use a shell alias with perl as "hexer":

alias hx='perl -ne'\''printf "%*vX\n"," ","$_"'\'

alias hxr="perl -ne'for(split){print chr hex}'"


4058 0 /tmp $ echo 48 61 70 70 79 A | hxr
Happy

4059 0 /tmp $ echo Happy | hx
48 61 70 70 79 A

greets,
LxC

Reply via email to