Last active
January 12, 2019 20:41
-
-
Save gwpl/26fefe3a165304f3dedb21009506107f to your computer and use it in GitHub Desktop.
repeat command in bash n times ( answer https://unix.stackexchange.com/a/494158/9689 )
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 | |
n=$1 | |
shift 1 | |
for ((x=0; x<$n; ++x)); do | |
"$@" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment