[LUNI] Kill previous command?
David Terrell
dbt at meat.net
Wed Jun 20 12:50:17 CDT 2007
On Wed, Jun 20, 2007 at 10:30:40AM -0500, Michael Labowicz wrote:
> Dear Luni,
> I'm looking to record some FM radio off of my ivtv-compatible hardware
> encoding card. I'm currently planning on calling a script like this through
> a cron job and ending it through the use of a combination of sleep and kill:
>
> #! /bin/sh
> cat /dev/video24 > recording.wav & sleep 3h
> kill (previous process?)
>
> Problem is, I'm not sure how to kill the previous command, I know it has
> something to do with the ! symbol, but I can't seem to find how to do it.
> Any ideas?
>
> Thanks in advance!
you shell man page should have information like this (check under
job control).
cmd &
pid=$!
sleep 3h
kill $pid
--
David Terrell
dbt at meat.net
((meatspace)) http://meat.net/
More information about the luni
mailing list