while 1 bash 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 do-while
while : ; do
ACTION_CODE
[[ CONDITION_STATEMENT ]] || break
done