Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A simple bash shell hex converter' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A simple bash shell hex converter
Authored by: tfiedler on Mar 04, '03 10:32:37PM

Two bash aliases that might help out...

alias h2d='printf "%d\n" ${1}'
alias d2h='printf "0x%x\n" ${1}'

You can then just type "h2d 0xff" or "d2h 15" and get what you are looking for.



[ Reply to This | # ]
A simple bash shell hex converter
Authored by: mervTormel on Mar 04, '03 11:42:42PM

now, when did bash start allowing command line args in aliases?



[ Reply to This | # ]