public inbox for linux-newbie@vger.kernel.org
 help / color / mirror / Atom feed
From: John Kelly <bilbo@waitrose.com>
To: linux-newbie@vger.kernel.org
Subject: Re: how-to: one command for repeat OR iterate shell OR bash command delay OR interval
Date: Sun, 17 Jul 2005 06:35:08 +0100	[thread overview]
Message-ID: <20050717063508.302cbafe.bilbo@waitrose.com> (raw)
In-Reply-To: <200507171157.35066.admarshall@gmail.com>

Hi,
On Sun, 17 Jul 2005 11:57:34 +0700
AD Marshall <admarshall@gmail.com> 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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

  reply	other threads:[~2005-07-17  5:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-17  4:57 how-to: one command for repeat OR iterate shell OR bash command delay OR interval AD Marshall
2005-07-17  5:35 ` John Kelly [this message]
2005-07-17  6:07   ` AD Marshall
2005-07-17  6:16     ` AD Marshall
2005-07-19  3:24       ` [Solution] " AD Marshall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050717063508.302cbafe.bilbo@waitrose.com \
    --to=bilbo@waitrose.com \
    --cc=linux-newbie@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox