sh 重试命令直到成功

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 重试命令直到成功相关的知识,希望对你有一定的参考价值。

# Usage:
<until|while> <command>
do echo "Retrying"; done

# Example of retry until it succees
until passwd
do echo "Retrying"; done

# Example of retry until it fails
while rspec spec/models/race_condition_spec.rb
do echo "Retrying"; done

以上是关于sh 重试命令直到成功的主要内容,如果未能解决你的问题,请参考以下文章