Skip to content

Instantly share code, notes, and snippets.

@p7cq
Created April 26, 2020 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p7cq/5a94766ea964d67f467174cc7febe6ee to your computer and use it in GitHub Desktop.
Save p7cq/5a94766ea964d67f467174cc7febe6ee to your computer and use it in GitHub Desktop.
Steam locomotive screensaver
#!/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