On a coupon site someone posted a shell script for finding Godaddy discount codes.
1 - Could someone explain how this script works?
Specifically, I'm confused about the syntax:
links url -dump | grep AI
2 - Does shell scripting allow you to spider a site just as perl/python/ruby would?
3 - Is the most efficient way to accomplish the desired goal or would perl/python/ruby be a more effective technology to use for this task?
4 - Is this ethical/legal?
#!/bin/sh
gdaddy=600
while [ "$gdaddy" -lt "700" ]
do
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z
do
echo "The results for gdr0$gdaddy"a"$i" >> output
links http://www.godaddy.com/default.aspx?isc=gdr0$gdaddy"a"$i -dump | grep -A1 "SPECIAL OFFER" >> output
echo >> output
echo >> output
done
gdaddy=`expr $gdaddy + 1`
done