Dan Nicholson wrote: > On 5/25/06, thorsten <[EMAIL PROTECTED]> wrote: >> >> a shorter way is >> >> perl -e 'print 0x315' >> >> or >> >> python -c 'print 0x315' >> >> however the more explanatory way is yours, Dan :-) > > Sweet. Thorsten, can you convert from arbitrary bases (binary, octal) > to decimal like this? I image that it's automatic depending on the > notation of the number.
perl -e 'print 0x315' ==>hex to dec perl -e 'print 0800' ==>octal to dec ( leading zero means octal) perl -e 'print 0b110111' ==>binary to decimal it also should work the other way around, however I have to look how to format the perl print instruction properly. Thorsten -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
