A: Get the Guess

   1 #!/bin/bash
   2 
   3 ## Starting message
   4 echo "Welcome to the Guessing Game."
   5 
   6 ## Initialize our variables
   7 number=$RANDOM
   8 guess=0
   9 
  10 ## Get the next guess
  11 echo "What is your guess?"
  12 read guess
  13 
  14 ## Display the guess
  15 echo -n "Your guess is $guess."

Scripting_Bash_Intro/208 A: Get the Guess (last edited 2009-09-09 13:39:03 by MarkSuter)