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

Re: Simple calculator



On Mon, October 26 1998, James Troup <james@nocrew.org> wrote:
|Rob Browning <rlb@cs.utexas.edu> writes:
|
|> "Dr. Michael Meskes" <meskes@online-club.de> writes:
|> 
|> > 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*$//'
|
|[...]
|
|> Just don't call it calc.  We already have one in apcalc.
|
|Okay, anyone got any other ideas for a name?  Using alternatives to
|manage apcalc's calc and this small shell script doesn't seem right
|somehow...

I missed the original message, but what's wrong with expr(1)?

--Amos

--Amos Shapira                    | "Of course Australia was marked for
133 Shlomo Ben-Yosef st.          |  glory, for its people had been chosen
Jerusalem 93 805                  |  by the finest judges in England."
ISRAEL        amos@gezernet.co.il |                     -- Anonymous


Reply to: