Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!zephyr.ens.tek.com!orca.wv.tek.com!quark!jeff From: jeff@quark.WV.TEK.COM (Jeff Beadles) Newsgroups: comp.unix.shell Subject: Re: bourne shell query Message-ID: <8465@orca.wv.tek.com> Date: 30 Aug 90 20:34:55 GMT References: <26DC6447.15922@maccs.dcss.mcmaster.ca> <8446@orca.wv.tek.com> Sender: news@orca.wv.tek.com Reply-To: jeff@quark.WV.TEK.COM (Jeff Beadles) Organization: Tektronix, Inc., Wilsonville, OR Lines: 26 scott@tab00.larc.nasa.gov (Scott Yelich) writes: >As a side question, does ANYONE have any bourne shell routines which do >math... reasonably effeciently? (For numbers > 1000?) Well, I use expr. For example: a=123456 b=123 c=`expr $a - $b` d=`expr $a \* $b` echo "c = $c" echo "d = $d" Note, that the '*' MUST be quoted, as the shell will expand it. "Shell qouting -- Know it, live it, be it. -Jeff" :-) -Jeff -- Jeff Beadles jeff@quark.WV.TEK.COM Utek Engineering, Tektronix Inc. +1 503 685 2568 SPEEA - Just say no.