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: linux while loop
while true;
do
#code
;done
#!/bin/bash
while true
do
echo "Press [CTRL+C] to stop.."
sleep 1
done
while true;
do
#code
;done