command-line calculator?

Bill Schoolcraft bill at wiliweld.com
Fri Jun 25 18:01:54 PDT 2004


At Fri, 25 Jun 2004 it looks like Aaron composed:

> CD Baby wrote:
> > What simple built-in command-line tools are available if I want to
> > just do some simple math on the command line?
> >
> > If I'm there in a shell, and need to know what 17 times 36 equals?
>
> $ bc
> bc 1.06
> Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
> This is free software with ABSOLUTELY NO WARRANTY.
> For details type `warranty'.
> 17*36
> 612
> ^D

I usually try this.....

	echo 17*36 | bc

Then you don't have to start and stop bc.


--
Bill Schoolcraft
PO Box 210076                 -o)
San Francisco CA 94121         /\
"UNIX, A Way Of Life."        _\_v

http://billschoolcraft.com



More information about the freebsd-questions mailing list