Created
October 15, 2016 01:53
-
-
Save drbr/7f22839f817282064fb7441b13c04e78 to your computer and use it in GitHub Desktop.
When a command is specified as arguments, runs the command multiple times, printing out the number of the iteration, and waits for the user to press Enter between each run.
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/zsh | |
i=0 | |
while { true }; do | |
echo $((++i)): | |
$@ | |
read | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment