* Uwe Hermann <[EMAIL PROTECTED]> [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: [EMAIL PROTECTED]  • http://www.coresystems.de/

-- 
linuxbios mailing list
[email protected]
http://www.linuxbios.org/mailman/listinfo/linuxbios

Reply via email to