If you need to extract all the links / URLs from a Google search you can use the following commands:
Select All Code:
1 2 | wget -q -U "Mozilla/5.001" -O - "http://www.google.com/search?q=inurl%3Aaftershell.com&num=100&start=200" | \ grep -o '<a href="http[^"]*"'|grep -v 'search?q=cache:'|grep -v '\.google\.'|sed 's/<a href="//;s/"$//' |
You can modify them to save the output or change the parameters for the languages (&hl= and &lr= ) and many more... Image may be NSFW.
Clik here to view.