Wget call in a Perl script

Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Wget call in a Perl script
# 1  
Old 12-13-2005
Lightbulb Wget call in a Perl script

I've got to do a wget call in a Perl Script.

I am basically doing migration of a shell script which was previously doing it.
The code in the sh file was as follows.

wget -nv -o /tmp/wget.run.log -t 5 -w 10 http://windows-server/myapp/1try.asp?myparam=no

This wget command is executing an ASP page on a remote IIS server.

Now, this command will create a file with the name 1try.asp?myparam=no in my current directory.

The sh script actually runs many wget commands and creates many such files. Ultimately I do a cat on all files and redirect the o/p to a single csv file.
This csv file is then used by sqlldr to load into the DB.

The whole process seems very complicated and hence i want to replace this sh script wth a perl script.
Do let me know if I can exclude the use of wget and use something else.
Also, if I have to use wget how can I make the process smoother and less complicated and easy to implement and maintain.

# 2  
Old 12-28-2005
I've done something

But this is untested. So I need your views on it.

unless( `$WGET -nv -o /tmp/wget.asp.log -t 5 -w 10 http://windows-server/myapp/1try.asp?myparam=no` )
print " Cannot execute http://windows-server/myapp/1try.asp?myparam=no on the Soft-Ex Server\n";

Also I cannot test this as i don't have access to this server where the asp file is. But still i need to write the code. Please help.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Call a Perl script within a bash script and store the ouput in a .txt file

I'm attempting to write a bash script that will create a network between virtual machines. It accepts three arguments: an RSpec that describes the network topology, and two list of machines (servers and clients). I have a (working) Perl script that I want to call. This Perl script takes an RSpec... (6 Replies)
Discussion started by: mecaka
6 Replies

2. Shell Programming and Scripting

Call .profile in perl script

Hello Gurus Can anyone please let me know how to call .profle file in perl script When I am calling the .profile file its giving error Shall I create unix script which has .profile command and call perl script internally (2 Replies)
Discussion started by: Pratik4891
2 Replies

3. Shell Programming and Scripting

How to call expect script from Perl

I have a Perl script sub.pl, and i want to call another Expect script called sub.exp. The sub.exp will generate a text file called sub.txt, while the sub.pl called from a html form will display the content of sub.txt to the textarea on the html form. How do I call sub.exp from sub.pl??? ... (5 Replies)
Discussion started by: cxbest
5 Replies

4. Shell Programming and Scripting

how to call a bash script using perl

Hi I m new to perl. I m trying to write a perl script that calls a bash script; does anyone have a script already that they can provide or help me out? Thanks a lot. (2 Replies)
Discussion started by: adnan786
2 Replies

5. Shell Programming and Scripting

Perl cgi script to call bash script?

Novice to perl here. I have created a simple web page in perl, with only one submit button. I would like to execute a bash script on the same server when this button is clicked on. Is this possible in perl? I have spent a few days researching this and am unable to find any useful information.... (0 Replies)
Discussion started by: pleonard
0 Replies

6. Shell Programming and Scripting

call shell script from perl cgi script problem

hi,, i have perl scipt with line : system('./try.sh $t $d $m'); in shell scipt try.sh i have the line: echo $1 its not printing value of $t that i hav passed..y is it so..i am running it from apache web server (2 Replies)
Discussion started by: raksha.s
2 Replies

7. Shell Programming and Scripting

Using wget in a Perl script

Hi, I've written a script in Perl that generates a URL and prints it. So if I run the script from the command line, I get something like this: $ script.pl http://www.url.com/folder/file.extI would like to use this script with wget to download the file at the URL generated. Is there a simple... (2 Replies)
Discussion started by: Altay_H
2 Replies

8. Shell Programming and Scripting

Call a perl script inside a shell script

Hi all, I have the following snippet of code.. #!/bin/sh echo "run perl script............" #Run the verification script perl bill_ver echo " perl script completed....." echo "rename files......" #Remove from all file in the directories test, test1, test2, test3 for f in... (3 Replies)
Discussion started by: chriss_58
3 Replies

9. Shell Programming and Scripting

how to call a perl script from tcsh?

Hi I am not sure how to call a perl script from a tcsh shell. do i need to set any environment variables? your help is appreciated Thanks (1 Reply)
Discussion started by: megastar
1 Replies

10. UNIX for Dummies Questions & Answers

how can call perl script as command?

Hello say i have written some perl scripts , now i like to call them in my unix shell as unix command like "more" , "ls" , "grep" so that my say perl script called "foo.pl" will be called from every where as "foo" or "foo arg1 arg2"? Thanks (1 Reply)
Discussion started by: umen
1 Replies
Login or Register to Ask a Question

Featured Tech Videos