Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by www.shellscript.sh #
 
PREVIOUS NEXT
Tagged: #shell #script #loop
ADD COMMENT
Topic
Name
8+7 =