Executes a bash command. If it fails it is called again.