[Shell] dec2hex hex2dec

| | Comments (1)

dec2hex
#!/bin/sh
printf "%X\n" $1

hex2dec (bash only)
#!/bin/sh
echo $((0x$1))

1 Comments

Very useful! I usually put hex #s in filenames for organizational purposes. Also good for finally finding out what "DEADBEEF" is in decimal!

Thanks!

Leave a comment

March 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Pank published on July 22, 2004 10:09 AM.

startx procedure in Mandrake was the previous entry in this blog.

Netscape fullscreen is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.