aboutsummaryrefslogtreecommitdiffstats
path: root/examples/scripts/randomcard.bash
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2014-02-25 20:36:50 -0500
committerChet Ramey <chet.ramey@case.edu>2014-02-25 20:36:50 -0500
commit4539d736f1aff232857a854fd2a68df0c98d9f34 (patch)
tree841c9a36d28c9a4d61c1b2d79524ccbe5f5c5029 /examples/scripts/randomcard.bash
parentf281b8f4f8936b2713966274d9f8508a9f0910e4 (diff)
downloadandroid_external_bash-4539d736f1aff232857a854fd2a68df0c98d9f34.tar.gz
android_external_bash-4539d736f1aff232857a854fd2a68df0c98d9f34.tar.bz2
android_external_bash-4539d736f1aff232857a854fd2a68df0c98d9f34.zip
prep for bash-4.3 release
Diffstat (limited to 'examples/scripts/randomcard.bash')
-rw-r--r--examples/scripts/randomcard.bash18
1 files changed, 0 insertions, 18 deletions
diff --git a/examples/scripts/randomcard.bash b/examples/scripts/randomcard.bash
deleted file mode 100644
index 9cb6b50..0000000
--- a/examples/scripts/randomcard.bash
+++ /dev/null
@@ -1,18 +0,0 @@
-# The following prints a random card from a card deck.
-#
-# cribbed from the ksh93 book, example from page 70
-#
-# chet@po.cwru.edu
-#
-declare -i i=0
-
-# load the deck
-for suit in clubs diamonds hearts spades; do
- for n in ace 2 3 4 5 6 7 8 9 10 jack queen king; do
- card[i]="$n of $suit"
- i=i+1 # let is not required with integer variables
- done
-done
-
-# and print a random card
-echo ${card[RANDOM%52]}