View Single Post
Old 26th September 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Default

Quote:
Originally Posted by PatrickBaer View Post
mplayer does indeed a good job so far. But there's something else:

I want to record a webradio show every night from 11pm to midnight.

I can only think of mplayer ... &; sleep 3600; kill -TERM %1

Somebody have more elegant approach?
Fill in the APP_PARA variable and use this script with cron:

Code:
#! /bin/sh

APP_NAME=mplayer
APP_PARA=
APP_CMD="$APP_NAME $APP_PARA"
APP_PID="pgrep $APP_NAME \| head -1"

AT_PARA=midnight
AT_CMD="at $AT_PARA"

$APP_CMD &
echo "kill $($APP_PID)" | $AT_CMD
__________________
The power of plain text? It can control an entire OS
Reply With Quote