I have a shell script that uses wget to grab a bunch of html from a url.
URL_DATA=`wget -qO - "$URL1"`
I now have a string $URL_DATA that I need to pull a substring out of..say I had the following in my string
<p><a href="/scooby/929011567.html">Dog pictures check them out! -</a><font size="-1"> (Silly)</font></p> <p><a href="/shaggey/928861647.html">Vacation -</a><font size="-1"> (boating)</font></p> <p><a href="/gopher/928782568.html">Garden -</a><font size="-1"> (winter)</font></p>
I want to extract the URL, Title and Description throughout the string...like the following
/scooby/929011567.html
Dog pictures check them out!
(silly)
/shaggey/928861647.html
Vacation
(boating)
/gopher/928782568.html
Garden
(winter)
and keep going with that pattern as many times as it's in the string. How would I do this?