From owner-freebsd-questions Tue Jan 11 1:51: 1 2000 Delivered-To: freebsd-questions@freebsd.org Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175]) by hub.freebsd.org (Postfix) with ESMTP id 4E2201538C for ; Tue, 11 Jan 2000 01:50:57 -0800 (PST) (envelope-from sheldonh@axl.noc.iafrica.com) Received: from sheldonh (helo=axl.noc.iafrica.com) by axl.noc.iafrica.com with local-esmtp (Exim 3.11 #1) id 127xwj-000Pof-00; Tue, 11 Jan 2000 11:50:37 +0200 From: Sheldon Hearn To: dl@tyfon.net Cc: "[FreeBSD-Questions-List] (E-post)" Subject: Re: mathematics in sh In-reply-to: Your message of "Tue, 11 Jan 2000 09:49:28 +0100." <01BF5C19.27B849F0.dl@tyfon.net> Date: Tue, 11 Jan 2000 11:50:37 +0200 Message-ID: <99240.947584237@axl.noc.iafrica.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 11 Jan 2000 09:49:28 +0100, Dan Larsson wrote: > Is it possible to do mathematical ( simple calculations such as > ($a + $b)/$c) calculations in sh? > Or is perl better to use in this case? Perl's better if you need floating point values. But for simple integer arithmetic, /bin/sh works fine. See the Arithmetic Expansion section of the sh(1) manual page. Ciao, Sheldon. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message