O'Reilly logo
  • QIAN Weishuo thinks this is interesting:

repeat() { while :; do $@ && return; done }

From

Cover of Linux Shell Scripting Cookbook - Third Edition

Note

":" 相当于 "/bin/true" 但是不用开新的进程,效率更高