I love bashpodder! It works, and I learned the xsltproc command because of it. How cool is that? I have attached a modified script that I'm using. It's not fully tested, but, you may want to pass it around for evaluation. It adds a trap handler to deal with having the script get killed (when I shut down the system). The cleanup code takes care of writing out the playlist. Also, I added some code to prevent two copies of bashpodder from running at the same time. This way, I can run the cron more frequently, without risk of overlapping downloads. #!/bin/bash # By Linc 10/1/2004 # Find the latest script at http://linc.homeunix.org:8080/scripts/bashpodder # Last revision 07/01/2005 - Many Contributers! # If you use this and have made improvements or have comments # drop me an email at linc dot fessenden at gmail dot com # I'd appreciate it! # Catch interruptions trap cleanup 1 2 3 6 # The cleanup function cleanup() { # Move dynamically created log file to permanent log file: cat podcast.log >> temp.log sort temp.log | uniq > podcast.log rm temp.log # Create an m3u playlist: ls $datadir | grep -v m3u > $datadir/podcast.m3u # Remove lock file rm bashpodder.lock exit 1 } # Make script crontab friendly: cd $(dirname $0) # datadir is the directory you want podcasts saved to: datadir=$(date +%Y-%m-%d) # Check for and create datadir if necessary: if test ! -d $datadir then mkdir $datadir fi # Delete any temp file: rm -f temp.log # Bail out if there's another copy running if test -e bashpodder.lock ; then exit fi touch bashpodder.lock # Read the bp.conf file and wget any url not already in the podcast.log file: while read podcast do file=$(wget -q $podcast -O - | xsltproc parse_enclosure.xsl - 2> /dev/null) || file=$(wget -q $podcast -O - | tr '\r' '\n' | tr \' \" | sed -n 's/.*url="\([^"]*\)".*/\1/p') for url in $file do if ! grep "$url" podcast.log > /dev/null then wget -q -P $datadir "$url" && echo $url >> temp.log fi done done < bp.conf cleanup