OT-ish - converting hex output to binary on a Unix platform

From: Stephane Tsacas <stephane.tsacas_at_gmail.com>
Date: Fri Jul 30 21:16:09 2004

awk --non-decimal-data 'BEGIN {RS=" "} {x="0x"$0; printf("%d ", x)}'
0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 1F 20 FC FD FE FF
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 31 32 252 253 254 255

better ?

On Fri, 30 Jul 2004 18:26:12 -0700 (PDT), Dwight K. Elvey
<dwight.elvey_at_amd.com>
wrote:
...
> I'm not sure this is what he is looking for. I think
> he wants the hex number converted to a byte value
> not just printed in ascii as a binary value.
> Dwight
>
>
Received on Fri Jul 30 2004 - 21:16:09 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:53 BST