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 }
Linux Shell Scripting Cookbook - Third Edition
by Shantanu Tushar
Published by
Packt Publishing, 2017
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 }