summaryrefslogtreecommitdiff
path: root/newegg.sh
blob: 235000f185c77bd4d11d8ceff98e19e195bb73ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
sed -n \
	-e 's/.*<a href="\(.*\)" title="View Details">/URL\t\1/p' \
	-e 's/.*<span class="itemDescription">\(.*\)<\/span>/Desc\t\1/p' \
	-e 's/.*<li class="priceFinal">\(.*\)<\/li>/Price\t\1/p' \
	-e 's/.*<li class="priceShip">\(.*\)Shipping<\/li>/Ship\t\1/p' | \
sed \
	-e 's/<\/*[a-z]*>//g' \
	-e 's/&#40;/(/g' \
	-e 's/&#41;/)/g' \
	-e 's/&#47;/\//g' \
	-e 's/Ship\tFree/Ship\t$0.00/' > newegg.$$.out
grep '^URL' newegg.$$.out | cut -f2 >newegg.$$.url
grep '^Desc' newegg.$$.out | cut -f2 >newegg.$$.desc
grep '^Price' newegg.$$.out | cut -f2 >newegg.$$.pri
grep '^Ship' newegg.$$.out | cut -f2 >newegg.$$.ship
paste newegg.$$.{url,desc,pri,ship}