[prog] bash, reading and displaying hex

Conor Daly conor.daly at oceanfree.net
Sun Nov 9 21:16:57 EST 2003


On Sun, Nov 09, 2003 at 07:21:46PM +0100 or so it is rumoured hereabouts, 
Hamster thought:
> 
> offset=`dd if=/dev/cdrom skip=33597 count=1`
> printf 'The GMT offset is 0x%02X' $offset

What happens if you set offset manually to be 0x08 and then print it?  Can
you combine the commands and does that help? ie.

printf 'The GMT offset is 0x%02X' `dd if=/dev/cdrom skip=33597 count=1`

Conor (guessing...)
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
  8:16pm  up 17 days, 13:25,  0 users,  load average: 0.00, 0.01, 0.00
Hobbiton.cod.ie
  8:14pm  up 17 days, 13:24,  1 user,  load average: 0.01, 0.01, 0.00


More information about the Programming mailing list