Last active
September 2, 2017 18:39
-
-
Save kernelkaribou/55c71ee3b7eebc6fd07827419d492001 to your computer and use it in GitHub Desktop.
QuickScriptRepeater
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SCRIPT_CMD="/bin/bash ./my_script.sh" | |
TOTAL_RUNS=2 | |
SLEEP_TIME=30 | |
let SLEEP_COUNTER=TOTAL_RUNS-1 | |
COUNTER=0 | |
while [ $COUNTER -lt $TOTAL_RUNS ]; do | |
eval $SCRIPT_CMD | |
if [ $COUNTER -lt $SLEEP_COUNTER ]; then | |
sleep $SLEEP_TIME | |
fi | |
let COUNTER=COUNTER+1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment