#!/bin/bash # get the RealPlayer stream from internet of the Lenoir show of yesterday # You can change the date of recording by adding the date as argument (eg: 20080318) DATE=${1:-$(/bin/date -d yesterday +%Y%m%d)} RAM=http://ondemand.tv-radio.com/france_inter/LENOIR/LENOIR$DATE.ram RM="$HOME/Music/lenoir/lenoir-$DATE.rm" # it's necessary to remove CRLF after the name, mplayer is disturbed by this STREAM=$(/usr/bin/curl $RAM 2> /dev/null | /usr/bin/tr -d \\r\\n) # /dev/null are necessary for it to work in background /usr/bin/mplayer -really-quiet -dumpfile "$RM" -dumpstream "$STREAM" < /dev/null > /dev/null 2>&1