From owner-freebsd-questions Thu Aug 22 23:21:20 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A6E637B400 for ; Thu, 22 Aug 2002 23:21:16 -0700 (PDT) Received: from 216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com (216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com [216.164.225.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id B182B43E7B for ; Thu, 22 Aug 2002 23:21:15 -0700 (PDT) (envelope-from uminac@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com) Received: from localhost (uminac@localhost) by 216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com (8.11.6/8.11.6) with ESMTP id g7N6LEr90925 for ; Fri, 23 Aug 2002 02:21:14 -0400 (EDT) (envelope-from uminac@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com) Date: Fri, 23 Aug 2002 02:21:14 -0400 (EDT) From: "Christopher J. Umina" To: FreeBSD Question Mailing List Subject: expr replacement Message-ID: <20020823021838.V67143-100000@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi guys & gals, I'm writing a simple shell script that finds percentages for me. The problem here is that when I do the division with expr I always get a result of 0 since it's below 1. Is there a replacement for this or am I just doing it wrong? Take a look.. This is my command. percentage=`expr $dirttl / $totalsongs` where $totalsongs = aroudn 1000 and dirttl = anywhere from 8 to 565. Thanks, Christopher J. Umina To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message