View Single Post
Old 08-06-2011, 12:51 PM  
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
Shell script help needed

Can someone who knows shell scripting spot my problem, everything appears to be correct but it's returning no results.

this is the html code that has the item_id code (ex: 55963573) that I need to collect
Code:
<a href="http://www.domain.com/vendors/cat.html?item_id=55963573" 
onclick="itemPlayPlop.open(this.href); return false;">
shell script
Code:
while read prodName;
do
  wget -q -U Mozilla "http://www.domain.com/$prodName/" -O - \
  | tr '"' '\n' | grep "^?item_id=" | cut -d ' ' -f 4 >> itemIDs.txt
done < catNames.txt
thanks in advance
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote