Wget to ignore an IP address | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Wget to ignore an IP address

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-04-2012
sathyaonnuix's Avatar
sathyaonnuix sathyaonnuix is offline
Registered User
 
Join Date: Aug 2012
Last Activity: 4 December 2013, 2:33 AM EST
Posts: 127
Thanks: 34
Thanked 14 Times in 13 Posts
Wget to ignore an IP address

Hello Unix Geeks,

I am in a situation to use wget for crawling a site where the site contains 5 IP addresses. Out of 5, 4 are accessible and 1[say it as X.X.X.X] is having a problem due to firewall problems.

In this case, my wget is getting stuck with that X.X.X.X and giving up. How can I ignore this IP and redirect my wget to use the other IP out of 4.

Kindly help me on this...
Sponsored Links
    #2  
Old 12-04-2012
Scott's Avatar
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 19 April 2014, 5:22 PM EDT
Location: in der Schweiz
Posts: 8,322
Thanks: 313
Thanked 1,013 Times in 886 Posts
You can try using one of the wget "timeout" options.
Sponsored Links
    #3  
Old 12-04-2012
sathyaonnuix's Avatar
sathyaonnuix sathyaonnuix is offline
Registered User
 
Join Date: Aug 2012
Last Activity: 4 December 2013, 2:33 AM EST
Posts: 127
Thanks: 34
Thanked 14 Times in 13 Posts
timeout can help you to come out of it when the time breaches, isn't it ? My case is to try the other IP address and not the X.X.X.X
    #4  
Old 12-04-2012
Scott's Avatar
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 19 April 2014, 5:22 PM EDT
Location: in der Schweiz
Posts: 8,322
Thanks: 313
Thanked 1,013 Times in 886 Posts
There are possibly other options, such as changing your hosts file or using iptables, etc, but I don't want to make any assumptions about how you are doing what you're doing. Can you explain in more detail the steps you are taking and what the goal is?

Also, please say which operating system (incl. version) and what shell you are using.
Sponsored Links
    #5  
Old 12-04-2012
sathyaonnuix's Avatar
sathyaonnuix sathyaonnuix is offline
Registered User
 
Join Date: Aug 2012
Last Activity: 4 December 2013, 2:33 AM EST
Posts: 127
Thanks: 34
Thanked 14 Times in 13 Posts

Code:
 $ wget --version
GNU Wget 1.11.4 Red Hat modified


Code:
uname -a
Linux 2.6.18-308.11.1.el5 #1 SMP Fri Jun 15 15:41:53 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux


Code:
$ echo $0
ksh

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Specifying IP address with curl/wget colinireland Shell Programming and Scripting 4 11-28-2011 06:36 AM
Tracing a MAC address to IP address: Solaris DNT IP Networking 9 08-17-2010 08:10 AM
What would the physical address be for virtual address? lemon_06 UNIX for Dummies Questions & Answers 0 06-09-2010 08:05 AM
Panic kernal-mode address fault on user address 0x14 Twix UNIX for Dummies Questions & Answers 10 06-15-2009 09:42 AM
How to Achive IP address through MAC(Ethernet) address krishnacins IP Networking 3 08-29-2005 08:45 PM



All times are GMT -4. The time now is 09:52 AM.