wget mp3 files?

Kevin Brown kevin_brown at qwest.net
Sat Sep 24 23:40:58 MST 2005


>>save the index page
>>grep for the mp3 links
>>search and replace all text leading up to the url and after the url
>>sed -e 's/^.*<a href="//g;s/".*$//g'
>>resulting lines should just be the urls
>>for p in `cat file`
>>do
>>wget $p
>>done
>>
>>grep and sed can be used in conjunction by piping one into the other
>>grep "<a href" index | sed.... > file
> 
> 
> OK this is cool!
> 
> I now have a file with just the mp3 URLs in it, one per line.  However,
> that 'for' loop you show will not run for me.  It puts the 'cat' and
> 'file' strings one at a time in two wget commands.  What shell should I
> use for it to work right?  I pointed it at bash with '#!/bin/bash'

` not ' (back ticks, not single or double quotes)


More information about the PLUG-discuss mailing list