#!/bin/sh #This script shows the until loop, which is the same as the #while loop except that the while runs while test is true, #and until runs until test is true number=7 #here I set the guess variable #I had to do this because the first test needed an integer guess=347 #here I get user input the " in the test are optional until [ "$number" -eq "$guess" ] do echo -n "Enter a number between 1 and 10:" read guess echo you entered $guess done echo "Correct your guess $guess was the correct number $number" #CSC128: Shell Script Examples - until-do-done control structure