-
-
Save peterc/9998128 to your computer and use it in GitHub Desktop.
loop - run the same command over and over at the (bash) command line easily
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
Place the code in loop.sh into your .bash_profile or similar. Or include it with `source`. | |
Then to use: | |
loop [your commands here] | |
For example: | |
loop ls -l |
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
loop () { | |
while : | |
do | |
${*} | |
sleep 1 | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment