LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2012, 04:43 PM   #1
Shavonn
LQ Newbie
 
Registered: Jul 2012
Posts: 2

Rep: Reputation: Disabled
Talking Totally GREEN: Perl/Shell Copy


Need a Perl script to copy an html page at a URL to the local server.

I've searched all around but I don't know enough to have any grasp on how to adapt anything for my purpose.

I wish to copy the live poll results over to the server and then move it to our includes dir.

Any assistance would be greatly appreciated.

TIA
 
Old 07-18-2012, 04:56 PM   #2
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 592

Rep: Reputation: 140Reputation: 140
Try
Code:
wget "url"
 
Old 07-18-2012, 08:23 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,950

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by Shavonn View Post
Need a Perl script to copy an html page at a URL to the local server.
I've searched all around but I don't know enough to have any grasp on how to adapt anything for my purpose. I wish to copy the live poll results over to the server and then move it to our includes dir.

Any assistance would be greatly appreciated.
We will be glad to HELP, but we're not going to write a script for you. Just putting "perl script to download web page" into Google pulls up lots of examples, like this one, with complete explanations:

http://www.sitepoint.com/file-download-script-perl/
 
Old 07-20-2012, 10:43 AM   #4
Shavonn
LQ Newbie
 
Registered: Jul 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Figured it out on my own. Thanks, anyway. :-)
Code:
#!/bin/sh

/opt/oss/bin/wget URL -O /TMP/DIR/file.html
cp /TMP/DIR/file.html  /www/INCLUDE/DIR/file.html
*CALLED PROCESS TO PUBLISH TO SPECIFIC SERVER*  /www/INCLUDE/DIR/file.html

sleep 60
 
Old 07-20-2012, 11:27 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,950

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by Shavonn View Post
Figured it out on my own. Thanks, anyway. :-)
Code:
#!/bin/sh

/opt/oss/bin/wget URL -O /TMP/DIR/file.html
cp /TMP/DIR/file.html  /www/INCLUDE/DIR/file.html
*CALLED PROCESS TO PUBLISH TO SPECIFIC SERVER*  /www/INCLUDE/DIR/file.html

sleep 60
Great...but that's not a perl script, like your first post said you needed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl experts: I need to run shell command from perl using pipe idreesedu Programming 14 01-11-2011 05:52 PM
copy directories and files recursively using C shell or bash shell bostonuser Programming 7 06-06-2008 02:24 AM
Totally Green need laptop recommendations maillavell Linux - Hardware 2 04-10-2006 12:45 AM
Disabling Perl/CGI Scripts totally renegadeavenger Linux - General 1 08-14-2005 08:28 PM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 09:09 PM


All times are GMT -5. The time now is 02:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration