读书人

转载:linux停使用bc在命令行中进行计

发布时间: 2012-06-29 15:48:46 作者: rapoo

转载:linux下使用bc在命令行中进行计算

原文:http://www.basicallytech.com/blog/index.php?/archives/23-command-line-calculations-using-bc.html

bc是一个在命令行使用的强大计算器,本文作者通过实例来介绍bc命令的使用,是你瞬间掌握bc的基本应用。

文末,作者还给出了通过bc计算5000位PI的命令来测定你的cpu性能

--------------------------

?

This article shows how to quickly perform standard calculations on the command line including addition, subtraction, multiplication, division, square root, powers, conversion from decimal to hex, decimal to binary, hex to decimal, and binary to decimal. It also briefly introduces using?bc?in interactive mode and how to write files for use with?bc?for frequently repeated operations. There is a mention of using Google for performing calulations. It finishes with a little challenge to test the power of your CPU.

Other advantages of using?bc?include:

读书人网 >UNIXLINUX

热点推荐