#!/bin/ksh

# Magic8Ball.ksh
# Tue Apr 21 21:11:11 PDT 2009
# Chieh Cheng
# http://www.CynosureX.com/

# GNU General Public License (GPL) Version 2, June 1991

  set -A phrases "Signs point to yes." "Yes." "Reply hazy, try again." "Without a doubt." "My sources say no." "As I see it, yes." "You may rely on it." "Concentrate and ask again." "Outlook not so good." "It is decidedly so." "Better not tell you now." "Very doubtful." "Yes - definitely." "It is certain." "Cannot predict now." "Most likely." "Ask again later." "My reply is no." "Outlook good." "Don't count on it."

  range=${#phrases[*]}
  num=`Random.sh 1 ${range}`
  num=`expr ${num} - 1`
  echo "${phrases[$num]}"
