Forum Moderators: phranque
is there anyway to extract all the urls from this file?
ive tried the xargs and greg command but it doesnt work.
anyone with a solution please.
regards
id
<use example.com in code>
[edited by: tedster at 11:07 am (utc) on May 21, 2004]
i have a txt file that contains some data which looks like
<ExternalPage about="example.com/PHILLIPSHOTGLASS/GlassPage.html">
<d:Title>John phillips Blown glass</d:Title>
<d:Description>A small display of glass by John Phillips</d:Description>
</ExternalPage>
<d:Title>Computers</d:Title>
<link r:resource="http://www.example.ie/FME/"/>
<link r:resource="example.com/computers/pnyhlen/Timeline.html"/>
</Topic>
i want a script which extracts only the domains from this file and saves it in a txt file.
i was given this unix command but it doesnt work.
grep 'http://' t.txt ¦ sed 's/.*\(http:.*\)\".*/\1/' ¦ perl -MURI -e 'while(<>) { $url = URI->new($_); print $url->authority,"\n"; }'
anyone can help?