Skip to content

Instantly share code, notes, and snippets.

@limtbk
Created February 6, 2016 08:47
Show Gist options
  • Save limtbk/3d5dc751b7a12736f5ed to your computer and use it in GitHub Desktop.
Save limtbk/3d5dc751b7a12736f5ed to your computer and use it in GitHub Desktop.
Record Radio-t podcast
#!/bin/bash
NOW=$(date +"%Y-%m-%d")
NUMBER=`cat radio-t_number`
RADIOTDIR=~/RadioT/${NUMBER}_${NOW}
mkdir -p $RADIOTDIR
cd $RADIOTDIR
while [ ! -f stream.m3u ]; do
wget http://stream.radio-t.com:8181/stream.m3u
sleep 5m
done
mv stream.m3u rt_podcast${NUMBER}.mp3
NUMBER=$((NUMBER+1))
echo $NUMBER>radio-t_number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment