#!/bin/sh # # dump a radio stream for a specified time # using streamripper if [ $# -ne 2 ] ; then echo "usage: $0 STREAM MINUTES" >&2 exit 1 fi seconds=`expr "$2" \* 60` echo "recording $2 minutes from now (`date +%F_%H-%M`) on" dir=`date "+%F_%H-%M"` mkdir "$dir" cd "$dir" streamripper "$1" -l "$seconds"