From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7535 invoked from network); 31 Dec 2005 06:57:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 31 Dec 2005 06:57:05 -0000 Received: (qmail 79345 invoked from network); 31 Dec 2005 06:56:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 31 Dec 2005 06:56:59 -0000 Received: (qmail 6815 invoked by alias); 31 Dec 2005 06:56:50 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9803 Received: (qmail 6805 invoked from network); 31 Dec 2005 06:56:49 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 31 Dec 2005 06:56:49 -0000 Received: (qmail 78200 invoked from network); 31 Dec 2005 06:56:49 -0000 Received: from s1tank.virtdom.com (216.240.101.50) by a.mx.sunsite.dk with SMTP; 31 Dec 2005 06:56:47 -0000 Received: (qmail 63760 invoked by uid 89); 31 Dec 2005 07:30:32 -0000 Received: from ool-4355e580.dyn.optonline.net (HELO venti) (brian@aljex.com@67.85.229.128) by s1tank.virtdom.com with SMTP; 31 Dec 2005 07:30:32 -0000 Message-ID: <024d01c60dd7$576ed990$931fa8c0@venti> From: "Brian K. White" To: Subject: math, percentage Date: Sat, 31 Dec 2005 01:56:35 -0500 Organization: Aljex Software MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 is there a way to do this with built in math instead of running bc ? tp=`echo "scale=0;(${t}*100)/$T" |bc` T = some dynamic total number like `ls |wc -l` t = counter that starts at 1 and incriments as a loop walks through T tp = percent of total job completed so far Thanks Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/ +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!