Invoke URL's from file and comment with # symbol which are not working


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Invoke URL's from file and comment with # symbol which are not working
# 1  
Old 08-23-2007
Invoke URL's from file and comment with # symbol which are not working

Hi All,


my intention is read urls from a file (what ever url's it may be) but the url's which are not opening i.e which displays 404 , page not found error and so on should be commented in the file with # symbol.


for the correct url's : nothing to be done(except script should validate whether the url is working or not)

for the wrong urls's : script should place a # symbol infront of the url in a file
example: # http://yahoommail.com/


Kindly help me out with a script...... pls
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Confusion in working of carat(^) symbol

hi All, i have googled and found that below are the functionality of carat symbol Meaning of carat is "at the beginning of line"; "it can also negate matches" how do i know when carat is behaving as beginning of line or as a negate. regards, scriptor (6 Replies)
Discussion started by: scriptor
6 Replies

2. Programming

To invoke pass parameters in Oracle file

Hi Guys, I am having a sql script file which does below operations ALTER TABLE M1 EXCHANGE PARTITION FOR (TO_DATE('&1','dd-MON-yyyy')) WITH TABLE &2 INCLUDING INDEXES; i need to pass variables in such a way that if i pass start date and end date as parameter , something like my... (2 Replies)
Discussion started by: rohit_shinez
2 Replies

3. Shell Programming and Scripting

Reading URL using Mechanize and dump all the contents of the URL to a file

Hello, Am very new to perl , please help me here !! I need help in reading a URL from command line using PERL:: Mechanize and needs all the contents from the URL to get into a file. below is the script which i have written so far , #!/usr/bin/perl use LWP::UserAgent; use... (2 Replies)
Discussion started by: scott_cog
2 Replies

4. Shell Programming and Scripting

Stripping of a symbol from string not working properly

Hi All, I used this code to strip-off $-symbol from string values. a="$980" b="897" a=`echo "$a" | sed 's/$/ /g'` b=`echo "$b" | sed 's/$/ /g'` echo "$a" echo "$b" but this results in the output: 80 and 897 it works when i use a='$987' b='890' (13 Replies)
Discussion started by: angie1234
13 Replies

5. UNIX for Dummies Questions & Answers

Awk: print all URL addresses between iframe tags without repeating an already printed URL

Here is what I have so far: find . -name "*php*" -or -name "*htm*" | xargs grep -i iframe | awk -F'"' '/<iframe*/{gsub(/.\*iframe>/,"\"");print $2}' Here is an example content of a PHP or HTM(HTML) file: <iframe src="http://ADDRESS_1/?click=5BBB08\" width=1 height=1... (18 Replies)
Discussion started by: striker4o
18 Replies

6. Homework & Coursework Questions

Invoke an exe file!!

Hello, Thank you for reading my Thread. I am very very new to Perl / Shell Scripting here. I m assigned some tasks here. I have an exe file on our server. I have to navigate to the path and invoke the exe file. Can someone please guide me with that. Thanks you, Skaranth (1 Reply)
Discussion started by: skaranth
1 Replies

7. UNIX for Advanced & Expert Users

How to invoke an URL

Hi, I am trying to invoke an service using URL. I want to know how to call that url with nohup. nohup links "__http://Administrator:assword@ServName:8080/invoke/wm.server.admin/shutdown?bounce=no&option=force&timeout=0" & I am trying to run this command on unix command prompt, But in... (8 Replies)
Discussion started by: swap27
8 Replies

8. Solaris

/usr/lib/passwdutil.so.1: symbol __nsl_fgetspent_r: referenced symbol not found

deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies

9. Shell Programming and Scripting

Remove the comment symbol ' from a file.

I want to remove the commented lines in a file identified by ' symbol at the start of each ine. A sample example will be like: Input ----- 'IFerr_flag=0THEN iferr_flag=0then iferr_flag=0then iferr_flag=0then iferr_flag=0then iferr_flag=0then iferr_flag=0then Output -------... (3 Replies)
Discussion started by: joyan321
3 Replies

10. Shell Programming and Scripting

need to invoke a script upon arrival of a file

hi all, i recieve a file from other server, on a daily basis .... but the time of arrival is unpredictable .... i need to move this file to another directory before the next file arrives ... i have written a script that does this op and performs some manipulations on the data... but i... (2 Replies)
Discussion started by: sais
2 Replies
Login or Register to Ask a Question
URI::URL(3)						User Contributed Perl Documentation					       URI::URL(3)

NAME
URI::URL - Uniform Resource Locators SYNOPSIS
$u1 = URI::URL->new($str, $base); $u2 = $u1->abs; DESCRIPTION
This module is provided for backwards compatibility with modules that depend on the interface provided by the "URI::URL" class that used to be distributed with the libwww-perl library. The following differences exist compared to the "URI" class interface: o The URI::URL module exports the url() function as an alternate constructor interface. o The constructor takes an optional $base argument. The "URI::URL" class is a subclass of "URI::WithBase". o The URI::URL->newlocal class method is the same as URI::file->new_abs. o URI::URL::strict(1) o $url->print_on method o $url->crack method o $url->full_path: same as ($uri->abs_path || "/") o $url->netloc: same as $uri->authority o $url->epath, $url->equery: same as $uri->path, $uri->query o $url->path and $url->query pass unescaped strings. o $url->path_components: same as $uri->path_segments (if you don't consider path segment parameters) o $url->params and $url->eparams methods o $url->base method. See URI::WithBase. o $url->abs and $url->rel have an optional $base argument. See URI::WithBase. o $url->frag: same as $uri->fragment o $url->keywords: same as $uri->query_keywords o $url->localpath and friends map to $uri->file. o $url->address and $url->encoded822addr: same as $uri->to for mailto URI o $url->groupart method for news URI o $url->article: same as $uri->message SEE ALSO
URI, URI::WithBase COPYRIGHT
Copyright 1998-2000 Gisle Aas. perl v5.12.1 2008-04-04 URI::URL(3)