Skip to content

Instantly share code, notes, and snippets.

@hartsock
Created October 4, 2022 13:50
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 hartsock/fe41608f9147b08a58d3963cbfe585a2 to your computer and use it in GitHub Desktop.
Save hartsock/fe41608f9147b08a58d3963cbfe585a2 to your computer and use it in GitHub Desktop.
Repeat the rest of the CLI 30 times. Example: `repeat.sh echo "foo"`
#!/usr/bin/env bash
STOP=30
i=0;
while [ $i -le $STOP ]
do
i=$((i+1))
echo -n "${i} :"
exec "$@"&
echo
echo -n "... pause ..."
sleep 3
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment