![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [PERL] Running unix commands within Perl Scripts | userix | Shell Programming and Scripting | 1 | 05-28-2008 03:06 PM |
| UNIX memory problems w/Progress DB | eddiej | UNIX and Linux Applications | 0 | 12-12-2007 09:06 AM |
| perl progress bar dialog | fed.linuxgossip | Shell Programming and Scripting | 4 | 09-18-2007 07:40 AM |
| IBM Unix progress gains kudos - VNUNet.com | iBot | UNIX and Linux RSS News | 0 | 07-18-2007 09:20 AM |
| TAR- Progress bar? | dicko44 | Shell Programming and Scripting | 1 | 09-01-2006 05:11 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi Programmers,
I just wrote a small script to print the percent complete. This maybe useful for someone! Code:
#!/usr/local/bin/perl
# Total from which percentage will be calculated
$cnt = 16;
$|=1;
for($i=0;$i<$cnt;$i++)
{
# Calculate Percentage
$percent = ($i/$cnt)*100;
# Print Progress
for($k=0;$k<$percent;$k=$k+5)
{
print "|";
}
print " <-- $percent% Complete --> ";
# Goto the start of the line
print "\r";
sleep 1;
}
print "\n>>>>>>>>>>---------100% Complete---------<<<<<<<<<<\n";
.:: HiFake ::. |
|||
| Google UNIX.COM |
| Forum Sponsor | ||
|
|