Skip to content

Instantly share code, notes, and snippets.

@tiagoamaro
Created February 22, 2018 14:24
Show Gist options
  • Save tiagoamaro/8467524e1066696ab3283c13bf7bb275 to your computer and use it in GitHub Desktop.
Save tiagoamaro/8467524e1066696ab3283c13bf7bb275 to your computer and use it in GitHub Desktop.
Run a command until it returns an exist status different than 0
# Author: James Healy (https://twitter.com/jim_healy)
#!/bin/bash
$@
while [ $? -eq 0 ]; do
$@
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment