hi can someone assist me with setting up a shell script that does the following?
- wget to http://site.com/xap/wp7?p=1
- 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.
- output to products.txt
- then loop through the process with step 1. url http://site.com/xap/wp7?p=1 where "1" is page number up to number 50. ex. http://..wp7?p=1, http://..wp7?p=2, http://..wp7?p=3
i've done some research on my own and have this much code written myself... definitely needs a lot more work
#! /bin/sh
...
while read page; do
wget -q -O- "http://site.com/xap/wp7?p=$page" |
sed ...
done < "products.txt"