Skip to content

Instantly share code, notes, and snippets.

@jezstephens
Forked from khakimov/gist:3558086
Last active February 5, 2023 04:48
Show Gist options
  • Star 39 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save jezstephens/c34b3b803928a22631df to your computer and use it in GitHub Desktop.
Save jezstephens/c34b3b803928a22631df to your computer and use it in GitHub Desktop.
#!/bin/env sh
lines=$(tput lines)
cols=$(tput cols)
awkscript='
{
letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"
lines=$1
random_col=$3
c=$4
letter=substr(letters,c,1)
cols[random_col]=0;
for (col in cols) {
line=cols[col];
cols[col]=cols[col]+1;
printf "\033[%s;%sH\033[2;32m%s", line, col, letter;
printf "\033[%s;%sH\033[1;37m%s\033[0;0H", cols[col], col, letter;
if (cols[col] >= lines) {
cols[col]=0;
}
}
}
'
echo -e "\e[1;40m"
clear
while :; do
echo $lines $cols $(( $RANDOM % $cols)) $(( $RANDOM % 72 ))
sleep 0.05
done | awk "$awkscript"
@saargrin
Copy link

saargrin commented Jan 7, 2018

is there a way to use japanese ascii characters?

@drale2k
Copy link

drale2k commented May 1, 2018

just change the letters string to japanese characters

@Chr0n0AP
Copy link

Are you able to use this on cmd?

@basu021
Copy link

basu021 commented Apr 29, 2020

How to adjust size

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment