Created
January 3, 2019 21:21
-
-
Save Jcpetrucci/372b7a266b382ff81de47ef2991098dd to your computer and use it in GitHub Desktop.
mostly stagnant screen
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 | |
# made this to test the impact of changing a small part of the whole screen versus script(1) file size | |
export rows=$(tput lines); export cols=$(tput cols); | |
while :; do | |
( exec > .tmp-screen-changer.sh; | |
for r in $(seq 1 $rows); do | |
for i in $(seq 1 $cols); do | |
if (( $r == $rows / 2 )); then | |
if (( $i > $cols / 2 - 10 && $i < $cols / 2 + 10 )); then | |
printf '%s' $(head -c 1 <(tr -d -c '[:alpha:]' </dev/urandom)) | |
else | |
printf '%s' X | |
fi | |
else | |
printf '%s' X | |
fi | |
done | |
done ) | |
clear | |
cat .tmp-screen-changer.sh | |
sleep 0.1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment