On 24 Feb 2003, Peter Howell wrote:

> I would like to be able to run the rec command unattended.  Right now
> when executed, it will record sound until I hit C-c.  I would really
> like to be able to right a script which will execute "rec ...", then
> wait a specified period of time, then pass the C-c to it.  Or is there a
> simpler way?
>
> Thanks
>
> Peter

I don't have rec or any hardware to do with sound, so I'll use "yes"
to demonstrate a program that runs until interrupted.  Not I use SIGHUP
rather than SIGINT, as bash provides a handler for SIGINT for background
jobs.  stdout and stderr don't have to be null, but they have to be
directed away from the terminal.

#!/bin/sh
yes >/dev/null 2>/dev/null &
sleep 1
kill -HUP $!


Lawson
--
---oops---



________________________________________________________________
Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!
Visit www.juno.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to