1 # The following prints a random card from a card deck.
3 # cribbed from the ksh93 book, example from page 70
10 for suit in clubs diamonds hearts spades; do
11 for n in ace 2 3 4 5 6 7 8 9 10 jack queen king; do
13 i=i+1 # let is not required with integer variables
17 # and print a random card
18 echo ${card[RANDOM%52]}