LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-12-2011, 08:35 AM   #1
Cerephim
Member
 
Registered: Mar 2005
Location: Dayton, Ohio
Distribution: CentOS
Posts: 49

Rep: Reputation: 0
timing out a wget command in a script


Hi Folks,
I need to write a script that executes a wget. The difficulty being, if wget just sits there with no reply for a very long time, I don't want the script to run that long.

How can I time out the wget command in the script if it doesn't give me a reply in a minute or so?
 
Old 01-12-2011, 09:14 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Did oyu have a look at the wget man page? Especially this option: --timeout=seconds

There are also some other time-out related options, but I'm guessing that the first one will do what you want/need.

Hope this helps.
 
1 members found this post helpful.
Old 01-12-2011, 09:42 AM   #3
Cerephim
Member
 
Registered: Mar 2005
Location: Dayton, Ohio
Distribution: CentOS
Posts: 49

Original Poster
Rep: Reputation: 0
D'oh! I must have missed that. I scanned the page only briefly.
 
Old 01-12-2011, 09:49 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Two pairs of eyes always see more then one pair
 
  


Reply



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
FTP script timing out nazs Programming 1 03-10-2008 10:26 PM
shell script timing rockarolla Programming 4 01-06-2007 06:11 AM
Script help for awk and timing commands jakev383 Linux - General 2 12-18-2006 07:35 PM
how to start timing and print the timing result on portions of java codes ?? alred Programming 2 05-15-2006 10:00 AM
SSH remote command not timing out tajsss Other *NIX 5 04-28-2005 06:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:45 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
Open Source Consulting | Domain Registration