re: How to run a command in your shell until it succeed VIEW POST

FULL DISCUSSION
 

To maximize laziness, you can make it into a function called retry() and have the rsync command as the first argument.

 

Yup, but I'm too lazy to maximize my laziness :D

Anyway, if somebody is wondering, something like that should do it (ugly, may be unsafe, you are warned):

function retry() {
  until $1 ;
  do
    echo "Retrying at `date -Iminutes`";
  done
}
code of conduct - report abuse