Skip to content

Instantly share code, notes, and snippets.

@draplater
Last active August 29, 2015 14:13
Show Gist options
  • Save draplater/2b5babea0cf8367e075f to your computer and use it in GitHub Desktop.
Save draplater/2b5babea0cf8367e075f to your computer and use it in GitHub Desktop.
Shell Script: Try a command until success.
#!/bin/sh
# filename: try-until-wrapper
until "$@"
do
echo -e "\033[31m Try Again. \033[0m"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment