Mailinglist Archive: opensuse (2234 mails)
| < Previous | Next > |
Re: [SLE] Write a script to poll LM_78 sensors periodically?
- From: alexm@xxxxxxxxxxx (alex medvedev)
- Date: Mon, 13 Sep 1999 09:06:57 -0500 (CDT)
- Message-id: <Pine.LNX.4.10.9909130904250.27886-100000@xxxxxxxxxxxxxx>
Hi,
i am not a script guru, but this is what you can do:
-------- start ------
while sleep 20
do
run_your_program_here
done
-------- end --------
-alexm
and start it with appended "&"
On Mon, 13 Sep 1999, Stuart Hall wrote:
> I know there are quite a few script gurus on this list who might be
> able to help me.
>
> I am trying to write a BASH script that will run a program every 20
> seconds. The program is called "sensors" which polls my cpu
> temperature sensors, but only once. I'd like it to happen repeatedly.
> I am piping the results to a text file (sensors.txt) where root-tail
> is displaying them on my KDE background. right now the results are
> static since I can only run "sensors" manually.
>
> I need help figuring out the following:
>
> 1. How to launch a program based on a specific time period. I have
> figured out for loops, but it doesn't really work very accurately
> implementing the delay between loops, and it only runs for the number
> of loops that I set in the script.
>
> Can this be done in C++ more easily that a script? I can figure out
> the looping a whole lot more easily (e.g. use a for (;;;) to make an
> endless loop).
>
> Thanks,
> stuart
> --
> Stuart Hall
> Connecticut, USA
> stuarthall@xxxxxxxxxxxxxxx
>
> --
> To unsubscribe send e-mail to suse-linux-e-unsubscribe@xxxxxxxx
> For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
> Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
>
--
To unsubscribe send e-mail to suse-linux-e-unsubscribe@xxxxxxxx
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
| < Previous | Next > |