while in terminal bash one line code example
Example 1: bash single line loop
while true; do foo; sleep 2; done
Example 2: bash do while one line
while : ; do ACTION_CODE;[[ CONDITION_STATEMENT ]] || break;done
while true; do foo; sleep 2; done
while : ; do ACTION_CODE;[[ CONDITION_STATEMENT ]] || break;done