This works fine (infinite loop):
$ while TRUE; do printf ".";done
.................................................. ...........................
I am trying to timeout this while loopwith the command timeout. All this does not work:
$ timeout 5 while TRUE; do printf ".";done
$ timeout 5 "while TRUE; do printf ".";done"
$ timeout 5 "while TRUE; do printf \".\";done"
$ timeout 5 $(while TRUE; do printf ".";done)
$ timeout 5 $('while TRUE; do printf ".";done')
What is the correct way (if one exists)?
source
share