Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Aug 2002 17:06:03 +1000
From:      Edwin Groothuis <edwin@mavetju.org>
To:        "Christopher J. Umina" <uminac@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com>
Cc:        FreeBSD Question Mailing List <questions@freebsd.org>
Subject:   Re: expr replacement
Message-ID:  <20020823070603.GN785@k7.mavetju>
In-Reply-To: <20020823021838.V67143-100000@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com>
References:  <20020823021838.V67143-100000@216-164-225-145.c3-0.wth-ubr2.sbo-wth.ma.cable.rcn.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 23, 2002 at 02:21:14AM -0400, Christopher J. Umina wrote:
> percentage=`expr $dirttl / $totalsongs`
> 
> where $totalsongs = aroudn 1000 and dirttl = anywhere from 8 to 565.

Easier way then:

	echo $totalsongs $dirttl | awk '{ print $2 / $1 }'

Edwin

-- 
Edwin Groothuis      |            Personal website: http://www.MavEtJu.org
edwin@mavetju.org    |    Weblog: http://www.mavetju.org/weblog/weblog.php 
bash$ :(){ :|:&};:   | Interested in MUDs? http://www.FatalDimensions.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020823070603.GN785>