title: Shell scripting for godaddy coupon codes - how does this script work?
body: <p>On a coupon site someone posted a <a href="http://forums.slickdeals.net/showpost.php?p=21204371&amp;postcount=211" rel="nofollow noreferrer">shell script</a> for finding Godaddy discount codes. </p>
  
  <p>1 - Could someone explain how this script works? </p>
  
  <p>Specifically, I'm confused about the syntax: </p>
  
  <pre><code>links url -dump | grep AI
  </code></pre>
  
  <p>2 - Does shell scripting allow you to spider a site just as perl/python/ruby would?</p>
  
  <p>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?</p>
  
  <p>4 - Is this ethical/legal?</p>
  
  <pre><code>#!/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" &gt;&gt; output
  links http://www.godaddy.com/default.aspx?isc=gdr0$gdaddy"a"$i -dump | grep -A1 "SPECIAL OFFER" &gt;&gt; output
  echo &gt;&gt; output
  echo &gt;&gt; output
  done
  
  gdaddy=`expr $gdaddy + 1`
  done
  </code></pre>