Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Wget to ignore an IP address

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 12-04-2012
sathyaonnuix's Unix or Linux Image
sathyaonnuix sathyaonnuix is offline
Registered User
 
Join Date: Aug 2012
Last Activity: 26 June 2014, 12:23 PM EDT
Posts: 129
Thanks: 35
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 Unix and Linux 12-04-2012
Scott's Unix or Linux Image
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 26 May 2015, 6:29 AM EDT
Location: Zürich
Posts: 8,553
Thanks: 337
Thanked 1,077 Times in 936 Posts
You can try using one of the wget "timeout" options.
Sponsored Links
    #3  
Old Unix and Linux 12-04-2012
sathyaonnuix's Unix or Linux Image
sathyaonnuix sathyaonnuix is offline
Registered User
 
Join Date: Aug 2012
Last Activity: 26 June 2014, 12:23 PM EDT
Posts: 129
Thanks: 35
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 Unix and Linux 12-04-2012
Scott's Unix or Linux Image
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 26 May 2015, 6:29 AM EDT
Location: Zürich
Posts: 8,553
Thanks: 337
Thanked 1,077 Times in 936 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 Unix and Linux 12-04-2012
sathyaonnuix's Unix or Linux Image
sathyaonnuix sathyaonnuix is offline
Registered User
 
Join Date: Aug 2012
Last Activity: 26 June 2014, 12:23 PM EDT
Posts: 129
Thanks: 35
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 Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 07:42 AM.