while loop terminal 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