-
-
Save p7cq/5a94766ea964d67f467174cc7febe6ee to your computer and use it in GitHub Desktop.
Steam locomotive screensaver
This file contains hidden or 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 | |
echo | |
echo "to exit, press Ctrl-C and wait for the locomotive to pass" | |
echo | |
sleep 3 | |
clear | |
trap "exit" INT | |
declare -a ca=( "-a" "-l" "-F" "-c" "-al" "-aF" "-ac" "-lF" "-lc" "-alF" "-alc" "-lFc" "-alFc") | |
for i in $(seq 1 8192); do | |
sl "${ca[$(shuf -i 1-${#ca[@]} -n 1)-1]}" | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment