Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a script that clicks the refresh button on firefox, and I have a script to delay. What I don't have is a script to make those actions repeat until I ^c it. How would I mkake this loop?

share|improve this question
up vote 1 down vote accepted

Put your script in a while loop. Sample code below, in-depth tutorial here.

#!/bin/bash

# This script opens 4 terminal windows.

i="0"

while [ $i -lt 4 ]
do
xterm &
i=$[$i+1]
done
share|improve this answer
    
Thanks got it working. – JShoe Apr 7 '11 at 3:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .