[LinuxBIOS] Convert hex to dec
Stefan Reinauer
stepan at coresystems.de
Thu Jul 5 05:58:18 CEST 2007
* Uwe Hermann <uwe at hermann-uwe.de> [070704 19:47]:
> I use some aliases in my .bashrc which are pretty handy for converting
> HEX or BINARY or DECIMAL:
>
> alias HEX="ruby -e 'printf(\"0x%X\n\", ARGV[0])'"
> alias DEC="ruby -e 'printf(\"%d\n\", ARGV[0])'"
> alias BIN="ruby -e 'printf(\"%bb\n\", ARGV[0])'"
>
> Usage:
>
> $ HEX 78
> 0x4E
> $ BIN 0x6a
> 1101010b
> $ DEC 0x72
> 114
cool stuff. Can it easily be fixed to convert binary into hex or dec,
too?
--
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.de • http://www.coresystems.de/
More information about the coreboot
mailing list