Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ms-access/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
cygwin curl或wget查找404';s_Curl_Cygwin_Wget - Fatal编程技术网

cygwin curl或wget查找404';s

cygwin curl或wget查找404';s,curl,cygwin,wget,Curl,Cygwin,Wget,我想点击一个文本文档,里面有一堆引用的URL,看看其中是否有404'ing。如果有一个404,我想得到的URL,试图放在一个文本文档。谁能帮我做这个 如果它是404,我只查找URL,我不需要wget-spider等提供的所有其他输出。脚本 #/垃圾箱/垃圾箱 读书时 做 回显“$REPLY” 如果wget--spider-q“$REPLY” 然后 回声“200 OK” 其他的 回显“404未找到” echo“$REPLY”>>p404s.txt fi 回声 完成

我想点击一个文本文档,里面有一堆引用的URL,看看其中是否有404'ing。如果有一个404,我想得到的URL,试图放在一个文本文档。谁能帮我做这个

如果它是404,我只查找URL,我不需要wget-spider等提供的所有其他输出。

脚本

#/垃圾箱/垃圾箱
读书时
做
回显“$REPLY”
如果wget--spider-q“$REPLY”
然后
回声“200 OK”
其他的
回显“404未找到”
echo“$REPLY”>>p404s.txt
fi
回声
完成
脚本输出

http://stackoverflow.com
200 OK

http://stackoverflow.com/1
404 Not Found

http://superuser.com
200 OK