How to find invalid URL in a text file using shell script?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to find invalid URL in a text file using shell script?
# 1  
Old 01-10-2012
How to find invalid URL in a text file using shell script?

How to find and remove invalid URLs in a text file using shell script?
# 2  
Old 01-10-2012
A combination of a while/read loop that takes the list as input, maybe testing with wget inside and checking it's return code on success or fail.
This User Gave Thanks to zaxxon For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Search for the invalid url in a file

Hello guys, Here i am writing a script to check for a valid url from a file,i am getting the valid url & i print it in a file and i want to print the invalid url also.how to do that? #here is my script if then URL=$(grep -E -o... (2 Replies)
Discussion started by: Meeran Rizvi
2 Replies

2. Shell Programming and Scripting

Extracting the column containing URL from a text file

I have the file like this: Timestamp URL Text 1331635241000 http://example.com Peoples footage at www.test.com,http://example4.com 1331635231000 http://example1.net crack the nuts http://example6.com 1331635280000 http://example2.net ... (3 Replies)
Discussion started by: csim_mohan
3 Replies

3. Shell Programming and Scripting

Extracting the column containing URL from a text file

I have the file like this: Timestamp URL Text 1331635241000 http://example.com Peoples footage at www.test.com,http://example4.com 1331635231000 http://example1.net crack the nuts http://example6.com 1331635280000 http://example2.net ... (0 Replies)
Discussion started by: csim_mohan
0 Replies

4. Shell Programming and Scripting

Extracting the column containing URL from a text file

I have the file like this: Timestamp URL Text 1331635241000 http://example.com Peoples footage at www.test.com,http://example4.com 1331635231000 http://example1.net crack the nuts http://example6.com 1331635280000 http://example2.net ... (0 Replies)
Discussion started by: csim_mohan
0 Replies

5. Shell Programming and Scripting

Text substitution & getting file name from url

hi, sorry if this seems trivial. i have a file url.txt which consists of a list of urls (it was supposed to be my wget -i file). however, since the server from which i am trying to download uses redirect, wget dows not remeber the filename of ther original url will save to a file name which is... (3 Replies)
Discussion started by: texttoolong
3 Replies

6. Shell Programming and Scripting

Bash Script to Find the status of URL

#!/bin/bash timevar=`date +%d-%m-%Y_%H.%M.%S` #-- > Storing Date and Time in a Variable get_contents=`cat urls.txt` #-- > Getting content of website from file. Note the file should not contain any http:// as its already been taken care of echo "Datae-time URL Status code Report" >... (2 Replies)
Discussion started by: anishkumarv
2 Replies

7. Programming

Bash Script to Find the status of URL

#!/bin/bash timevar=`date +%F_”%H_%M”` #-- > Storing Date and Time in a Variable get_contents=`cat urls.txt` #-- > Getting content of website from file. Note the file should not contain any http:// as its already been taken care of ######### Next Section Does all the processing ######### for i... (0 Replies)
Discussion started by: anishkumarv
0 Replies

8. Shell Programming and Scripting

writing shell script to find line of invalid characters

Hi, I have to write s script to check an input file for invalid characters. In this script I have to find the exact line of the invalid character. If the input file contain 2 invalid character sat line 10 and 17, the script will show the value 10 and 17. Any help is appreciated. (3 Replies)
Discussion started by: beginner82
3 Replies

9. UNIX for Advanced & Expert Users

script to open the specified url in a browser from a text file

Hi All, here i am struc (6 Replies)
Discussion started by: gsp
6 Replies
Login or Register to Ask a Question