Skip to content

Instantly share code, notes, and snippets.

@amatelin
Last active June 27, 2016 08:39
Show Gist options
  • Save amatelin/7fab029e51c05cdc1030 to your computer and use it in GitHub Desktop.
Save amatelin/7fab029e51c05cdc1030 to your computer and use it in GitHub Desktop.
A very simple introduction to bash scripting reproducing the classic scene from the Matrix (https://www.youtube.com/watch?v=6IDT3MpSCKI).
#!/bin/bash
# You need to install pv for it to work (sudo apt-get install pv)
# Don't forget to change the permissions on the file (sudo chmod +x white-rabbit.sh)
# Then just run ./white-rabbit.sh and enjoy
CURSOR="$USER@$HOSTNAME:${PWD}$"
echo -n $CURSOR
echo " Wake up, Neo..." | pv -qL 10
echo -n $CURSOR
echo " The matrix has you." | pv -qL 10
echo -n $CURSOR
echo " Follow the White Rabbit." | pv -qL 10
echo -n $CURSOR
echo " Knock, knock, Neo." | pv -qL 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment