bash while true do code example
Example 1: bash endless loop
#!/bin/bash
while true
do
echo "Press [CTRL+C] to stop.."
sleep 1
done
Example 2: while loop bash
while true;
do
#code
done
Example 3: linux while loop
while true;
do
#code
;done
Example 4: bash while done
while CONDITION_STATEMENT; do SOME_CODE; done
Example 5: bash do-while
while : ; do
ACTION_CODE
[[ CONDITION_STATEMENT ]] || break
done