Skip to content

Instantly share code, notes, and snippets.

@mehulmpt
Created November 17, 2017 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehulmpt/19234589131f99936463dcd9f322c2d7 to your computer and use it in GitHub Desktop.
Save mehulmpt/19234589131f99936463dcd9f322c2d7 to your computer and use it in GitHub Desktop.
Find your page number in Google's Hall of Fame
i=1
name="Mehul" # CHANGE YOUR NAME HERE
while true
do
echo "Running $i"
content=$(wget https://bughunter.withgoogle.com/characterlist/$i -q -O -)
res=$(echo $content | grep -c $name)
if [ $res -eq 1 ]; then
echo "Found at page => $i"
break
fi
i=$(($i+1))
done
@mehulmpt
Copy link
Author

It is very slow, single threaded, and single request at a time implementation of finding contents on a webpage with bash. Feel free to contribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment