#!/bin/bash #number=10 echo -n Please enter a positive integer that is 15 or lower: read number # this checks that the number is NOT gt 15 or (||) not less than 0 # see p. 365 Ch 10 for the logical operators if [ $number -gt 15 ] || [ $number -lt 0 ] then echo Hey this number NOT between 0 and 15! echo bye bye exit 1 else echo OK it\'s less than 15 so we\'ll keep going fi echo the value of '$number' is $number while [ "$number" -ge 1 ] do echo $number sleep .1 let number="$number-1" done echo the value has been decremented to 1 so the loop is over #CSC128: Shell Script Examples - while-do-done and let builtin