Background info:
I've got an XML file that my supplier uploads each night with new products and updated stock counts etc.
But they've stitched me up and they don't have a Description in the XML file, they have a link to their site which has the description in raw text.
What i need to do is have a script that loops through the document i download from them and replace the URL with the content of the URL.
For example, if i have
<DescriptionLink>http://www.leadersystems.com.au/DataFeed/ProductDetails/AT-CHARGERSTATION-45</DescriptionLink>
I want it to end up as
<DescriptionLink>Astrotek USB Charging Station Charger Hub 3 Port 5V 4A with 1.5m Power Cable White for iPhone Samsung iPad Tablet GPS</DescriptionLink>
I've tried a few things but i'm not very proficient with scripting or loops. So far i've got:
#!/bin/bash
LINKGET=`awk -F '|' '{ print $2 }' products-daily.txt`
wget -O products-daily.txt http://www.suppliers-site-url.com
sed 's/<DescriptionLink>*/<DescriptionLink>$(wget -S -O- $LINKGET/g' products-daily.txt
But again, i'm not sure how this all really works so it's been trial and error. Any help is appreciated!!!
Updated to include example URL.