假设你要用repeat()从Internet上下载一个暂时不可用的文件,不过这个文件只需要等一会 就能下载。方法如下:
调用自定义函数repeat
repeat wget -c http://www.example.com/software-0.1.tar.gz
自定义函数repeat
repeat() { while :; do $@ && return; sleep 30; done }
原文:https://www.cnblogs.com/singsong-ss/p/11461654.html