My new Mascot

I was bored so i wrote this little terminal animation, it utilizes tput and printf. Enjoy!

("<  KVACK! The code will make me dance
/ )
 "

#!/usr/bin/env bash

# Save cursor position
 tput sc

tput cup 0 0
 printf "%*s" "$(tput cols)" ' '
 printf "%*s" "$(tput cols)" ' >") '
 printf "%*s" "$(tput cols)" ' ( \ '
 printf "%*s" "$(tput cols)" ' ^^ '

sleep 2

sleep 0.1;tput cup 2 0 ;printf "%*s" "$(tput cols)" ' ( | '
 sleep 0.1;tput cup 2 0 ;printf "%*s" "$(tput cols)" ' ( \ '

sleep 1

sleep 0.2;tput cup 2 0 ;printf "%*s" "$(tput cols)" ' ( | '
 sleep 0.2;tput cup 2 0 ;printf "%*s" "$(tput cols)" ' ( \ '
 sleep 0.2;tput cup 2 0 ;printf "%*s" "$(tput cols)" ' ( | '
 sleep 0.2;tput cup 2 0 ;printf "%*s" "$(tput cols)" ' ( \ '

sleep 1

sleep 0.2;tput cup 3 0 ;printf "%*s" "$(tput cols)" ' ^ ^ '
 sleep 0.2;tput cup 3 0 ;printf "%*s" "$(tput cols)" ' ^^ '
 sleep 0.2;tput cup 3 0 ;printf "%*s" "$(tput cols)" ' ^ ^ '
 sleep 0.2;tput cup 3 0 ;printf "%*s" "$(tput cols)" ' ^^ '

sleep 1

sleep 0.3;tput cup 1 0 ;printf "%*s" "$(tput cols)" ' >") '
 sleep 0.3;tput cup 1 0 ;printf "%*s" "$(tput cols)" ' >") '
 sleep 0.3;tput cup 1 0 ;printf "%*s" "$(tput cols)" ' >") '
 sleep 0.3;tput cup 1 0 ;printf "%*s" "$(tput cols)" ' >") '

sleep 0.3;tput cup 1 0 ;printf "%*s" "$(tput cols)" ' ("< '
 sleep 0.3;tput cup 1 0 ;printf "%*s" "$(tput cols)" ' >") '

sleep 0.3

sleep 0.3;tput cup 1 0 ;printf "%*s" "$(tput cols)" ' KVACK >") '

sleep 5

# Restore cursor position
 tput rc
Categorized as Bash

Leave a comment

Your email address will not be published. Required fields are marked *