ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I'm having a problem using wget with ftp sites and verifying that a file is in existence on the ftp server here is my code:
for i in `seq 1 $loop` ; do
cut -d, -f$i web > site
wget -O file.html -i site -T 10 -t 2 --no-remove-listing
check=`grep 12.tgz file.html`
if [ ! "$check" ]
then cat site >> broken
else cat site >> verified
I have a master file that I use to pull ftp sites out of and run it in a loop I get about half of the sites that are valid are listing as bad I also tried this by grep'ing the .listing file but the same results.