while loop oneline bash code example
Example 1: while bash one line
while CONDITION_STATEMENT; do SOME_CODE; done
Example 2: bash do while one line
while : ; do ACTION_CODE;[[ CONDITION_STATEMENT ]] || break;done
while CONDITION_STATEMENT; do SOME_CODE; done
while : ; do ACTION_CODE;[[ CONDITION_STATEMENT ]] || break;done