logo       

Re: how-to: one command for repeat OR iterate shell OR bash command delay O: msg#00044

linux.newbie

Subject: Re: how-to: one command for repeat OR iterate shell OR bash command delay OR interval

Hi,
On Sun, 17 Jul 2005 11:57:34 +0700
AD Marshall <admarshall@xxxxxxxxx> wrote:

> Is there already one bash command to do what the following script
> does (poorly or incompletely), ie repeat "command" indefinitely
> every "x" seconds:
>
> #!/bin/sh
> # usage: repeat [x] <command>
> while true ; do $2 ; sleep $1 ; done
>
> < rest deleted >

The watch command might tbe what you want.
Or maybe not, if you don't want anything output to screen.

Try man watch for details.

regards,

John Kelly

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise