#-(root@node0)-(/opt/shoutcast)-# #-(0)> cat make_pls.sh #!/bin/sh INCOMING=/opt/shoutcast/incoming DIR=/opt/shoutcast/content cd $INCOMING && ls | while read line; do NEW=`echo "$line" |sed 's/\ /_/g' | sed 's/\$//g' | sed 's/\?//g' | sed 's/\&//g' | sed 's/\*//g' | sed 's/(/-/g' | sed 's/)/-/g' | sed 's/,//g' | sed 's/%//g'` && mv "$line" $NEW done chmod 644 * && echo "" > /opt/shoutcast/sc_trans/playlist.txt && mv $INCOMING/* $DIR/ ls $DIR | while read line; do `echo /opt/shoutcast/content/$line >> /opt/shoutcast/sc_trans/playlist.txt` done SC_PID=`pgrep sc_trans_linux` kill -HUP $SC_PID