Created
June 3, 2016 09:25
-
-
Save anonymous/22fdf6765c12fa84b875cd7791e8c5db to your computer and use it in GitHub Desktop.
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 | |
green="\033[0;32m" | |
brightgreen="\033[1;32m" | |
colors=($green $brightgreen) | |
colorcount=${#colors[@]} | |
OLDIFS="${IFS}" | |
trap "echo -e \"\\e[m\"; tput sgr0; IFS=\"${OLDIFS}\"; exit" SIGTERM SIGINT | |
IFS="" | |
clear | |
tput cup 0 0 | |
while read -n 1 -r XVAL <&0; do echo -n -e "${colors[$RANDOM%$colorcount]}${XVAL}"; done | |
echo -e "\e[m" | |
tput sgr0 | |
IFS="${OLDIFS}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment