02-14-2009
I am not working with CGI.
I am using WWW::Mechanize to download the file.
And i am trying to put together a download progress dialog, but the thing is, i cant do anything untill the download is complete.
And i am stuck here.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i am trying to write a script where in it will connect to remote servers and execute remote scripts to fetch some data and ftp it back to a main server. i would like to add a script where it will show some sort of status bar until such time that the expected files have been recieved.
something... (3 Replies)
Discussion started by: inquirer
3 Replies
2. UNIX for Advanced & Expert Users
Hi all,
I want to print # like that in a progress bar..
For e.g We can notice that during installation ... but,how to do that?
Thnx,
sakthi. (4 Replies)
Discussion started by: sakthi.abdullah
4 Replies
3. Shell Programming and Scripting
Hello,
In perl how to show the percentage download when we download something wget ...
For example when we wget some software instead of showing the following ......
============================================
# wget... (4 Replies)
Discussion started by: fed.linuxgossip
4 Replies
4. UNIX for Advanced & Expert Users
Hi all,
This is a reformed post to my earlier ones!!!!!!
I would like to know how to include a progress bar while using the cp...
I am copying a few huge files from cdrom but am unable to figure out ,how to give a progress bar!!!!!
I checked out other sites as well,but the issue here is... (1 Reply)
Discussion started by: wrapster
1 Replies
5. Shell Programming and Scripting
Hi friends,
how can I show a progress bar for any running process in the shell script.
For example when I am copying or compressing a file.
Thanks. (1 Reply)
Discussion started by: dwiravi
1 Replies
6. Shell Programming and Scripting
hi all,
in shell script (ksh), how do i write a progress bar ?? i have a script which searches files and while its searching i am currently printing out "." and if it finds what its searching for the script prints out the name of the file e.g
..................
firstFile.txt... (2 Replies)
Discussion started by: cesarNZ
2 Replies
7. Shell Programming and Scripting
I'm trying to use this code to get a progress bar for cp:
"Can you get cp to give a progress bar like wget?"
But I'm getting these errors:
stat: illegal option -- c
usage: stat
awk: division by zero
input record number 1, file
source line number 4
I'm using Mac OS X 10.6... (1 Reply)
Discussion started by: pcwiz
1 Replies
8. Shell Programming and Scripting
Looking for a solution to why my progress bar not working
My code
print "STARTED:\n ";
my $pdf = CAM::PDF->new('XYZ.pdf') or die $CAM::PDF::errstr;
print STDOUT "Processing File: ";
open (FILE, ">bill_data.txt") || die "Unable to save Bill_data.txt file";
for my $pagenum (1 ..... (4 Replies)
Discussion started by: chakrapani
4 Replies
9. Shell Programming and Scripting
Hi Experts;
Im in the process of writing a shell script for enabling an IT operations to run archiving.We use netbackup. The script is complete, though there is one bit that i need help on. Im trying to have a progess bar for the procedure.I have gone through the man page of the command in... (5 Replies)
Discussion started by: maverick_here
5 Replies
LEARN ABOUT DEBIAN
www::mechanize::cookbook
WWW::Mechanize::Cookbook(3pm) User Contributed Perl Documentation WWW::Mechanize::Cookbook(3pm)
NAME
WWW::Mechanize::Cookbook - Recipes for using WWW::Mechanize
INTRODUCTION
First, please note that many of these are possible just using LWP::UserAgent. Since "WWW::Mechanize" is a subclass of LWP::UserAgent,
whatever works on "LWP::UserAgent" should work on "WWW::Mechanize". See the lwpcook man page included with the libwww-perl distribution.
BASICS
Launch the WWW::Mechanize browser
use WWW::Mechanize;
my $mech = WWW::Mechanize->new( autocheck => 1 );
The "autocheck => 1" tells Mechanize to die if any IO fails, so you don't have to manually check. It's easier that way. If you want to do
your own error checking, leave it out.
Fetch a page
$mech->get( "http://search.cpan.org" );
print $mech->content;
"$mech->content" contains the raw HTML from the web page. It is not parsed or handled in any way, at least through the "content" method.
Fetch a page into a file
Sometimes you want to dump your results directly into a file. For example, there's no reason to read a JPEG into memory if you're only
going to write it out immediately. This can also help with memory issues on large files.
$mech->get( "http://www.cpan.org/src/stable.tar.gz",
":content_file" => "stable.tar.gz" );
Fetch a password-protected page
Generally, just call "credentials" before fetching the page.
$mech->credentials( 'admin' => 'password' );
$mech->get( 'http://10.11.12.13/password.html' );
print $mech->content();
LINKS
Find all image links
Find all links that point to a JPEG, GIF or PNG.
my @links = $mech->find_all_links(
tag => "a", url_regex => qr/.(jpe?g|gif|png)$/i );
Find all download links
Find all links that have the word "download" in them.
my @links = $mech->find_all_links(
tag => "a", text_regex => qr/download/i );
APPLICATIONS
Check all pages on a web site
Use Abe Timmerman's WWW::CheckSite http://search.cpan.org/dist/WWW-CheckSite/ <http://search.cpan.org/dist/WWW-CheckSite/>
SEE ALSO
WWW::Mechanize
AUTHORS
Copyright 2005-2010 Andy Lester "<andy@petdance.com>"
Later contributions by Peter Scott, Mark Stosberg and others. See Acknowledgements section in WWW::Mechanize for more.
perl v5.14.2 2011-08-05 WWW::Mechanize::Cookbook(3pm)