-
Notifications
You must be signed in to change notification settings - Fork 0
/
iching2.sh
32 lines (28 loc) · 871 Bytes
/
iching2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
# ******************************************************************************************
# *
# * File: iching2.sh
# *
# * Function: English iChing
# *
# * Author: Luca Marzo
# *
# * Course: Sistemi Operativi I - Facoltà di Ingegneria - Università del Salento
# *
# * Copyright: CreativeCommons 2008 - Attribution-Noncommercial-Share Alike 2.5 Generic
# *
# * Notes:
# *
# * Change History:
# * ++++++++++++++ GMT+01:00 Prima stesura
# *
# ******************************************************************************************
#
c=($(cat /usr/share/dict/words))
LUNGH=${#c[*]}
a="$(echo ${c[$((RANDOM*RANDOM%LUNGH))]} \
${c[$((RANDOM*RANDOM%LUNGH))]} ${c[$((RANDOM*RANDOM%LUNGH))]} \
${c[$((RANDOM*RANDOM%LUNGH))]} ${c[$((RANDOM*RANDOM%LUNGH))]} \
${c[$((RANDOM*RANDOM%LUNGH))]} ${c[$((RANDOM*RANDOM%LUNGH))]} )"
echo $a
say $a