#!/usr/local/bin/bash -x for i in {0,20,40,60,80} do # change sgenre= to what ever you want wget -r -w 1 -l1 -A pls -erobots=off "http://www.shoutcast.com/directory/index.phtml?sgenre=Electronic&startat=$i" done for i in {0,20,40,60,80} do # change sgenre= to what ever you want wget -r -w 1 -l1 -A pls -erobots=off "http://www.shoutcast.com/directory/index.phtml?sgenre=Old%20School&startat=$i" done for i in {0,20,40,60,80} do # change sgenre= to what ever you want wget -r -w 1 -l1 -A pls -erobots=off "http://www.shoutcast.com/directory/index.phtml?sgenre=Alternative&startat=$i" done for i in {0,20,40,60,80} do # change sgenre= to what ever you want wget -r -w 1 -l1 -A pls -erobots=off "http://www.shoutcast.com/directory/index.phtml?sgenre=Turntablism&startat=$i" done for i in {0,20,40,60,80} do # change sgenre= to what ever you want wget -r -w 1 -l1 -A pls -erobots=off "http://www.shoutcast.com/directory/index.phtml?sgenre=Hardcore&startat=$i" done for i in {0,20,40,60,80} do # change sgenre= to what ever you want wget -r -w 1 -l1 -A pls -erobots=off "http://www.shoutcast.com/directory/index.phtml?sgenre=Drum%20and%20Bass&startat=$i" done for i in {0,20,40,60,80} do # change sgenre= to what ever you want wget -r -w 1 -l1 -A pls -erobots=off "http://www.shoutcast.com/directory/index.phtml?sgenre=Breakbeat&startat=$i" done for i in {0,20,40,60,80} do # change sgenre= to what ever you want wget -r -w 1 -l1 -A pls -erobots=off "http://www.shoutcast.com/directory/index.phtml?sgenre=Techno&startat=$i" done cd www.shoutcast.com/sbin rm /data/m3u.m3u for img in `ls *.pls` do cat $img | sed 's/80[0-9][0-9]/monkey/g' | grep -v monkey | grep ":80" | ''sed -n 1p'' | sed 's/.*=//g' >> /data/m3u.m3u done