-2
while read -r line; do
wget -O /dev/null -S "$line" 2>&1 | grep -q -m 1 "Expires: Sun, 19 Nov 1978 05:00:00 GMT"
if [ ${PIPESTATUS[1]} -eq 0 ]; then # check greps return code
echo "Yes"
echo "$line" >> yes_urls.txt
else
echo "No"
fi
done < text.txt
我wget的是掛在隨機URL的,有沒有什麼辦法把它試圖給wget的URL,說最多然後在10秒,如果它不工作移到下一$行文本?wget的網址超時實現
謝謝!
只是出於好奇,你甚至*嘗試*研究之前問? – lxg 2014-10-28 23:10:37