SHELL SCRIPT:如何制作一个程序,通过网站的所有页面查找单词

时间:2016-05-31 00:27:33

标签: shell

这就是我所得到的,但它仅适用于网站的1页。我如何查找超过1页?

#!/bin/bash
echo "Type the URL:"
read site
ping -c 3 $site > /dev/null 2>&1
if [ $? -ne 0 ] 
then
echo "URL NOT FOUND "
else
echo "What word do you want to search?"
read exp
echo "$exp was found"
lynx -dump -nolist "$site" | grep -c -i "$exp"
echo "times"
fi

0 个答案:

没有答案