-
Notifications
You must be signed in to change notification settings - Fork 1
/
matrix
executable file
·147 lines (136 loc) · 3.01 KB
/
matrix
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/bin/bash
echo -e "\e[1;32m"
clear
virtcent=$((`tput lines`/2))
horcent=$((`tput cols`/2-10))
tput setf 6
tput cup $virtcent $horcent && echo "entering the matrix"
sleep 1
tput cup $virtcent $horcent && echo " "
sleep 1
tput cup $virtcent $horcent && echo "entering the matrix"
sleep 1
tput cup $virtcent $horcent && echo " "
sleep 1
tput cup $virtcent $horcent && echo "connecting. "
sleep .1
tput cup $virtcent $horcent && echo "connecting.. "
sleep .1
tput cup $virtcent $horcent && echo "connecting... "
sleep .1
tput cup $virtcent $horcent && echo "connecting.... "
sleep .1
tput cup $virtcent $horcent && echo "connecting..... "
sleep .1
tput cup $virtcent $horcent && echo "connecting...... "
sleep .1
tput cup $virtcent $horcent && echo "connecting....... "
sleep .1
tput cup $virtcent $horcent && echo "connecting....... "
sleep .1
tput cup $virtcent $horcent && echo "connecting....... "
sleep .1
tput cup $virtcent $horcent && echo "connecting........ "
sleep .1
tput cup $virtcent $horcent && echo "connecting........."
sleep 1
tput cup $virtcent $horcent && echo " CONNECTED "
sleep 1
clear
tput setf 2
lines="$(tput lines)"
col="$(tput cols)"
for i in $(seq 1 200) ; do
max1=$((RANDOM%3))
max=$(($lines-$max1))
declare -a char1
char1=(`matrix_dir/matrix_char.sh`)
declare -a char2
char2=(`matrix_dir/matrix_char.sh`)
declare -a char3
char3=(`matrix_dir/matrix_char.sh`)
declare -a char4
char4=(`matrix_dir/matrix_char.sh`)
declare -a char5
char5=(`matrix_dir/matrix_char.sh`)
declare -a char6
char6=(`matrix_dir/matrix_char.sh`)
declare -a char7
char7=(`matrix_dir/matrix_char.sh`)
declare -a char8
char8=(`matrix_dir/matrix_char.sh`)
declare -a char9
char9=(`matrix_dir/matrix_char.sh`)
declare -a char10
char10=(`matrix_dir/matrix_char.sh`)
l=$((RANDOM%$lines))
l2=$((RANDOM%$lines))
l3=$((RANDOM%$lines))
l4=$((RANDOM%$lines))
l5=$((RANDOM%$lines))
l6=$((RANDOM%$lines))
l7=$((RANDOM%$lines))
l8=$((RANDOM%$lines))
l9=$((RANDOM%$lines))
l10=$((RANDOM%$lines))
c=$((RANDOM%$col))
c2=$((RANDOM%$col))
c3=$((RANDOM%$col))
c4=$((RANDOM%$col))
c5=$((RANDOM%$col))
c6=$((RANDOM%$col))
c7=$((RANDOM%$col))
c8=$((RANDOM%$col))
c9=$((RANDOM%$col))
c10=$((RANDOM%$col))
while [ $l -lt $max ] ; do
tput cup $l $c
echo ${char1[${l}]}
if [ $l2 -lt $max ] ; then
tput cup $l2 $c2
echo ${char2[${l}]}
fi
if [ $l3 -lt $max ] ; then
tput cup $l3 $c3
echo ${char3[${l}]}
fi
if [ $l4 -lt $max ] ; then
tput cup $l4 $c4
echo ${char4[${l}]}
fi
if [ $l5 -lt $max ] ; then
tput cup $l5 $c5
echo ${char5[${l}]}
fi
if [ $l6 -lt $max ] ; then
tput cup $l6 $c6
echo ${char6[${l}]}
fi
if [ $l7 -lt $max ] ; then
tput cup $l7 $c7
echo ${char7[${l}]}
fi
if [ $l8 -lt $max ] ; then
tput cup $l8 $c8
echo ${char8[${l}]}
fi
if [ $l9 -lt $max ] ; then
tput cup $l9 $c9
echo ${char9[${l}]}
fi
if [ $l10 -lt $max ] ; then
tput cup $l10 $c10
echo ${char10[${l}]}
fi
l=$(($l+1))
l2=$(($l2+1))
l3=$(($l3+1))
l4=$(($l4+1))
l5=$(($l5+1))
l6=$(($l6+1))
l7=$(($l7+1))
l8=$(($l8+1))
l9=$(($l9+1))
l10=$(($l10+1))
done
done