Answers for "while loop sh !="

4

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
Posted by: Guest on May-08-2021
2

while loop shell script

#!/bin/sh

a=0

while [ $a -lt 10 ]
do
   echo $a
   a=`expr $a + 1`
done
Posted by: Guest on November-05-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language