View Single Post
Old 01-28-2011, 02:16 AM  
acctman
Confirmed User
 
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
Shell wget/sed script help needed

I need help using sed to parse html codiing, this is what i'm trying to do...

1. wget to http://site.com/xap/wp7?p=1
2. view the html extract all the ProductName's from in between title="Free Shipping ProductName"> ... ex: title="Free Shipping HD7-Case001"> , HD7-Case001 is extracted.
3. processes up to page 50

Code:
#! /bin/sh 

for ((  i = 1 ;  i <= 50;  i++  ))
do
	wget -q -O- "http://site.com/xap/wp7?p=$i" | 
	sed ... Need the parsing part

done < "products.txt"
acctman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote