title: Unix lynx in shell script to input data into website and grep result
body: <p>Pretty new to unix shell scripting here, and I have some other examples to look at but still trying from almost scratch.  I'm trying to track deliveries for our company, and I have a script I want to run that will input the tracking number into the website, and then grep the result to a file (delivered/not delivered).  I can use the lynx command to get to the website at the command line and see the results, but in the script it just returns the webpage, and doesn't enter the tracking number.</p>
  
  <p>Here's the code I have tried that works up to this point:</p>
  
  <pre><code>#$1 = 1034548607
  FNAME=`date +%y%m%d%H%M%S`
  
  echo requiredmcpartno=$1 | lynx -accept_all_cookies -nolist -dump -post_data http://apps.yrcregional.com/shipmentStatus/track.do 2&gt;&amp;1 | tee $FNAME &gt;/home/jschroff/log.lg
  
  DLV=`grep "PRO" $FNAME | cut --delimiter=: --fields=2 | awk '{print $DLV}'`
  
  echo $1 $DLV  &gt; log.txt
  rm $FNAME
  </code></pre>
  
  <p>I'm trying to get the results for the tracking number(PRO number as they call it) 1034548607.  </p>