zsh-users
 help / color / mirror / code / Atom feed
* math, percentage
@ 2005-12-31  6:56 Brian K. White
  2005-12-31  7:22 ` Eric Mangold
  2005-12-31  7:25 ` Dan Nelson
  0 siblings, 2 replies; 6+ messages in thread
From: Brian K. White @ 2005-12-31  6:56 UTC (permalink / raw)
  To: zsh-users

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!


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-01-05 23:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-31  6:56 math, percentage Brian K. White
2005-12-31  7:22 ` Eric Mangold
2005-12-31  7:25 ` Dan Nelson
2005-12-31 20:44   ` Brian K. White
     [not found]     ` <488030720601041505g7a9aee72nc8ebcf1bde13b3a4@mail.gmail.com>
2006-01-05  4:43       ` Brian K. White
2006-01-05 23:54         ` Jonathan Hankins

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).