Last active
December 27, 2024 17:54
-
-
Save mrfabbri/754926 to your computer and use it in GitHub Desktop.
A nerdy Christmas greeting script [original post: http://questionmark.blogsome.com/2008/12/24/nerdy-christmas-take-2/ ]
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 | |
#lights_off | |
# | |
# *==< | |
# /\ | |
# / \ | |
# / @ \ | |
# / \ | |
# / @ @ \ | |
# || | |
# | |
# NERDY CHRISTMAS | |
# AND | |
# GEEKY NEW YEAR! | |
# | |
#lights_on | |
# | |
# *==< | |
# /\ | |
# / *\ | |
# / @ \ | |
# / * * \ | |
# / @ * @ \ | |
# || | |
# | |
# NERDY CHRISTMAS | |
# AND | |
# GEEKY NEW YEAR! | |
# | |
frows=14 | |
stime=1 | |
# Ensure `tput` is available | |
if ! command -v tput &>/dev/null; then | |
alias tput="clear" | |
fi | |
display() { | |
tput cup 0 0 | |
grep -A"$frows" "#$1" "$0" | tail -n"$frows" | sed 's/#/ /' | |
} | |
animation() { | |
display lights_off && sleep "$stime" | |
display lights_on && sleep "$stime" | |
} | |
clear | |
yes | while read -r _; do | |
animation | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment