Created
May 31, 2016 09:48
-
-
Save wallyhall/0f7f45348ea92ad95e8616741344c3d3 to your computer and use it in GitHub Desktop.
"The Matrix prank". Confusing your fellow colleagues with a bashrc addition.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RAND=$[ ( $RANDOM % 10 ) + 1 ] | |
if [ $RAND -ne 1 ]; then | |
exit | |
fi | |
NAME="$(getent passwd $(whoami) | cut -d: -f5 | cut -d" " -f 1)" | |
MSG="Hello $NAME. The Matrix has you. Follow the white rabbit..." | |
clear | |
for (( i=0; i<${#MSG}; i++ )); do | |
SLEEP=$[ ( $RANDOM % 3 ) + 1 ] | |
sleep "0.$SLEEP" | |
echo -ne "${MSG:$i:1}" | |
done | |
echo "" | |
sleep 5 | |
cmatrix -s -b -u 3 -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment