Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wallyhall/0f7f45348ea92ad95e8616741344c3d3 to your computer and use it in GitHub Desktop.
Save wallyhall/0f7f45348ea92ad95e8616741344c3d3 to your computer and use it in GitHub Desktop.
"The Matrix prank". Confusing your fellow colleagues with a bashrc addition.
#!/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