- Linux Shell Scripting Cookbook(Third Edition)
- Clif Flynt Sarath Lakshman Shantanu Tushar
- 43字
- 2021-07-09 19:46:09
How to do it...
Define a function in the following way:
repeat() { while true do $@ && return done }
Alternatively, add this to your shell's rc file for ease of use:
repeat() { while true; do $@ && return; done }