dec2hex
#!/bin/sh
printf "%X\n" $1
hex2dec (bash only)
#!/bin/sh
echo $((0x$1))
Very useful! I usually put hex #s in filenames for organizational purposes. Also good for finally finding out what "DEADBEEF" is in decimal!
Thanks!
Posted by: Johnny at September 7, 2004 03:47 PM