while true;
do
#code
done
#!/bin/sh
INPUT_STRING=hello
while [ "$INPUT_STRING" != "bye" ]
do
echo "Please type something in (bye to quit)"
read INPUT_STRING
echo "You typed: $INPUT_STRING"
done
#!/bin/sh
a=0
while [ $a -lt 10 ]
do
echo $a
a=`expr $a + 1`
done
#!/bin/bash
i=0
While [ $i -le 10 ]
do
echo i:$i
((i+=1))
done
while check1
do
# Loop while check1 is successful (returns 0)
if check1
then
echo 'check1 was successful'
fi
done
#!/bin/bash
X=0
while [ $X -le 20 ]
do
echo $X
X=$((X+1))
done
while ! [ "${finished}" ]; do
...
done
finished=false
while ! $finished; do
...
# At some point
finished=true
done
while [ "$finished" != "true" ]; do
...
done