[sllug-members]: Command to Execute command continuously
Lamont R. Peterson
lamont at gurulabs.com
Wed Jun 21 00:36:02 MDT 2006
On Wednesday 21 June 2006 12:18am, Randy Clements wrote:
> I have a new DNS server I want to REALLY pound on. I found a little pair
> of scripts on the Internet which allows you to do a bunch of lookups and
> then return results.
>
> HOWEVER, I'd like to be able to run this command OVER and OVER and OVER
> again -- possibly getting it going MULTIPLE times on my machine in
> different shells.
>
> Anyone know how to do it? Currently I do a ./check from the command like
> to run my script after I chmod 777'ed the file. Works great. But then I
> have to wait for the result, then run it again manually.
>
> I want it to just run all flippin' night long -- is there a way to get it
> to run that continuously from the command line?
I would loop it like Jeff suggested. You could also do that within the
script, itself. Just wrap the "while; do" (stuff goes here) "done" around
the "stuff" you want repeated.
To really pound against your server, you could then launch your auto repeating
script with:
for i in $(seq 100); do ./script&; done
To kill them all, run (must be on the same shell they were launched on):
for i in $(seq 100); do kill %$i; done
--
Lamont R. Peterson <lamont at gurulabs.com>
Senior Instructor
Guru Labs, L.C. [ http://www.GuruLabs.com/ ]
GPG Key fingerprint: F98C E31A 5C4C 834A BCAB 8CB3 F980 6C97 DC0D D409
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://sllug.org/pipermail/sllug-members/attachments/20060621/e8d2c45a/attachment.pgp
More information about the sllug-members
mailing list