Skip to content

Instantly share code, notes, and snippets.

@Davidslv
Last active December 4, 2015 14:49
Show Gist options
  • Save Davidslv/c41c2cd6a55c0ae1329d to your computer and use it in GitHub Desktop.
Save Davidslv/c41c2cd6a55c0ae1329d to your computer and use it in GitHub Desktop.
Bash function to repeat anything in the terminal
# usage: repeatme 3 "echo e"
function repeatme() {
for i in $(seq 1 $1) ; do
$2
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment