[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Simple calculator

On Fri, Aug 07, 1998 at 12:06:05PM -0600, Neale Pickett wrote:
> Maybe we could convince the bc maintainer to add a shell script to the
> bc package (call it "calc" or something else easy to remember) which
> does command-line calculations, then; it seems as though a lot of people
> would find such a thing useful.
> #!/bin/sh
> if [ $# = 0 ]; then
>   echo "`basename $0`: must supply something to calculate!" >&2
>   exit 1
> echo "$*" | bc -l | sed 's/0*$//'

Good idea.


Dr. Michael Meskes		meskes@online-club.de, meskes@debian.org
Go SF49ers! Go Rhein Fire!	Use Debian GNU/Linux! 

Reply to: