Stuff the screenshots being a pain! I will post the code instead!
---------- Post added at 04:12 PM ---------- Previous post was at 04:11 PM ----------
enter.sh
#!/bin/bash
# Declare variable choice and assign value 3
choice=3
# Print to stdout
echo "1. Take the Blue Pill"
echo "2. Take the Red Pill"
echo -n "Choose Blue or Red? "
# Loop while the variable choice is equal 3
# bash while loop
while [ $choice -eq 3 ]; do
# read user input
read choice
# bash nested if/else
if [ $choice -eq 1 ] ; then
echo "You have chosen The Blue Pill"
sleep 1
./matrix.sh
else
if [ $choice -eq 2 ] ; then
echo "You have chosen The Red Pill"
sleep 1
echo "Trying to find the Red Pill."
sleep .1
echo "Trying to find the Red Pill.."
sleep 1
echo "Still trying to find the Red Pill..."
sleep .1
echo "Still trying to find the Red Pill...."
sleep 1
echo "Unfortunately it has been replaced with The Hormone Pill, you shall now grow breasts"
else
echo "Choose Blue or Red? !"
echo "1. Take the Blue Pill"
echo "2. Take the Red Pill"
echo -n "Choose Blue or Red? "
choice=3
fi
fi
done
---------- Post added at 04:12 PM ---------- Previous post was at 04:12 PM ----------
matrix.sh
#!/bin/bash
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 $horc#!/bin/bash
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/matrix_char.sh`)
declare -a char2
char2=(`~/matrix/matrix_char.sh`)
declare -a char3
char3=(`~/matrix/matrix_char.sh`)
declare -a char4
char4=(`~/matrix/matrix_char.sh`)
declare -a char5
char5=(`~/matrix/matrix_char.sh`)
declare -a char6
char6=(`~/matrix/matrix_char.sh`)
declare -a char7
char7=(`~/matrix/matrix_char.sh`)
declare -a char8
char8=(`~/matrix/matrix_char.sh`)
declare -a char9
char9=(`~/matrix/matrix_char.sh`)
declare -a char10
char10=(`~/matrix/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
ent && 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/matrix_char.sh`)
declare -a char2
char2=(`~/matrix/matrix_char.sh`)
declare -a char3
char3=(`~/matrix/matrix_char.sh`)
declare -a char4
char4=(`~/matrix/matrix_char.sh`)
declare -a char5
char5=(`~/matrix/matrix_char.sh`)
declare -a char6
char6=(`~/matrix/matrix_char.sh`)
declare -a char7
char7=(`~/matrix/matrix_char.sh`)
declare -a char8
char8=(`~/matrix/matrix_char.sh`)
declare -a char9
char9=(`~/matrix/matrix_char.sh`)
declare -a char10
char10=(`~/matrix/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
---------- Post added at 04:13 PM ---------- Previous post was at 04:12 PM ----------
matrix_char.sh
#!/bin/bash
for i in `cat ~/matrix/matrix.in ` ; do echo "$RANDOM .$i " ; done | sort -rn | awk '{print $2}' | sed -e '1{$p;x;d;}' -e '/^NEW/!{H;$!d;x;s/\n//g;b;}' -e 'x;s/\n//g;${p;x;}' | sed 's/\./ /g'
---------- Post added at 04:13 PM ---------- Previous post was at 04:13 PM ----------
matrix.sh
1
2
3
4
5
6
7
8
9
0
!
@
#
$
%
^
&
(
)
!
@
#
$
%
^
&
(
)
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
,
.
/
;
'
[
]
\
`
~
{
}
:
"
<
>
?
,
.
/
;
'
[
]
\
`
~
{
}
:
"
<
>
?
---------- Post added at 04:14 PM ---------- Previous post was at 04:13 PM ----------
It is important that you save these files in a folder called "matrix" in your home directory unless you want to go through all the code and change file paths!
---------- Post added at 04:15 PM ---------- Previous post was at 04:14 PM ----------
Quote:
Originally Posted by RupertPupkin
Here's a far less complicated poor man's one-liner version:
Code:
echo -e "\033[1;32m" && yes $(cat /bin/cat | hexdump -c) | hexdump -c
|
This works but it is too fast, to get the right effect you need more timing controls, but i take my hat off to your one liner!