wget mp3 files?

Alan Dayley alandd at consultpros.com
Sat Sep 24 23:14:50 MST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kevin Brown wrote:
 >
> 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'

Alan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDNkA7DQw/VSQuFZYRAiMPAJ4wFMXP8iphWNAUZwQ7QS3TOTUSDQCeKLtV
ol0AhMLdRPOABg9x2W/MQqY=
=+7KE
-----END PGP SIGNATURE-----


More information about the PLUG-discuss mailing list