#!/bin/bash
echo "recording timer"
if test -z $1; then
 echo Use: rec-timer.sh month day hour:min num-seconds
 echo
 echo example: rec-timer.sh jan 3 7:45  360
 echo   records 360 seconds on jan 3rd, 7h45
 echo
 echo month: jan feb mar apr may jun jul aug sep oct nov dec
 exit
fi


TMPFNAME="/home/music/tmp/tmp-at-command"
FNAME="/home/music/inbox/rec-$1$2-$3.mp3"

echo "recording $4 seconds"

echo "rec-line-in.sh $4 $FNAME" > $TMPFNAME

echo "ATCMD: at -f $TMPFNAME $3 $1 $2"
at -f $TMPFNAME $3 $1 $2

#
