星期四, 十月 25, 2007

用 bc 做进制转换

sh$ echo "obase=16; ibase=10; 1024 * 4096" | bc -l
400000
obase 即 output base,ibase 即 input base,结果当然是 0x400000

没有评论: