Dead link checker in bash
Hi, I have a code like this:
Code:
#!/bin/bash Any solution on this? |
Try:
Code:
wget -q --spider --user-agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1" http://supremecourtofindia.nic.in/ecommittee/25%20Salient%20Features%20of%20Ubuntu%20Linux%20OS%20DVD.pdf |
Thank you... it works like charm.... :)
|
Hey, I'm improving the script like below:
Code:
#!/bin/bash |
Never mind, it's solved, I add the --tries=xx argument in the wget option, so the script will looks like this:
Code:
#!/bin/bash |
As you are using bash you can also use 'if' to do the test for you:
Code:
if command; then |
All times are GMT -5. The time now is 05:30 AM. |