Skip to content

Instantly share code, notes, and snippets.

@peterc
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterc/9998128 to your computer and use it in GitHub Desktop.
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
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
loop () {
while :
do
${*}
sleep 1
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment