Descargar los ficheros mp3 de una pagina web

Lo haremos con este script que lo llamaremos wgetmp3.sh:

todo=0

if [ $todo -eq 1 ];then
wget -c -r -l1 -H -t1 -nd -N -np -A.mp3 -erobots=off -i sitiosmp3.txt</
else
rm -f *.htm
wget http://www.espacioenblanco.es/archivosonoro91.htm
for i in $(cat archivosonoro91.htm  | grep href | grep mp3 | cut -d «>» -f1  | cut -d «»» -f2  );do
f=$(echo $i | cut -d «/» -f8)
if [ -f «$f» ];then
echo «Existe $f …»
else
echo «Descargando … $f «
wget -c $i
fi
done
fi