syntax of do while loop in shell script code example
Example 1: while loop bash
while true;
do
#code
done
Example 2: shell script while loop example
#!/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