这就是我所得到的,但它仅适用于网站的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