Enviado em 04/12/2016 - 14:52h
Boa tarde pessoal.
#!/bin/bash
Nn=$(($(tput cols)/2))
BL="••••••••••••••••••••••••••••••••••••••••"
FC="\x1B[m"
NL="3"
COLS=$(tput cols)
INIC() { tput clear ; ARVORE ; }
GERACOR() {
[[ -z $CNT ]] && { CNT=$(echo {1..31}|sed 's/ /\n/g'|shuf -n1) ; export CNT ; }
C0="\x1B["$((CNT%2))";38;5;"$((CNT/2))"m"
C1="\x1B["$(((32-CNT)%2))";38;5;"$(((32-CNT)/2))"m"
let CNT++
(($CNT>31)) && CNT="1"
}
RANDCOR() {
PEGA_CNT
C0="\x1B["$((CNT%2))";38;5;"$((CNT/2))"m"
C1="\x1B["$(((32-CNT)%2))";38;5;"$(((32-CNT)/2))"m"
}
PEGA_CNT() { CNT=$(echo {1..31}|sed 's/ /\n/g'|shuf -n1) ; export CNT ; }
LINHA() { printf '%*s' "$((COLS-2))" '' | sed "s/ /—/g" ; }
ARVORE() {
sleep 0.2
printf ""$C0"\e[3;"$((Nn+1))"f*"$FC""
let z++
for N in "1..17" "9..25" "17..33" "5..9";do
for i in $(eval echo {$N..2});do
GERACOR
let NL++
printf "\e[$NL;"$((Nn-(i/2)))"f"$C1"*"$C0"${BL:0:$i}"$C1"*"$FC""
done
done
NL="3"
((z<=50)) && ARVORE || { printf "\n\n" ; BNATAL ; }
}
BNATAL() {
tput clear
P1=$(((COLS-71)/2))
GERACOR;sleep 0.0625
printf "\e[2;${P1}f${C0} * ____ ___ __ __ _ _ _ _____ _ _ *${FC}\n";sleep 0.0625
printf "\e[3;${P1}f${C1} *** | __ ) / _ \| \/ | | \ | | / \|_ _|/ \ | | ***${FC}\n";GERACOR;sleep 0.0625
printf "\e[4;${P1}f${C0} ***** | _ \| | | | |\/| | | \| | / _ \ | | / _ \ | | *****${FC}\n";sleep 0.0625
printf "\e[5;${P1}f${C1}******* | |_) | |_| | | | | | |\ |/ ___ \| |/ ___ \| |___ *******${FC}\n";GERACOR;sleep 0.0625
printf "\e[6;${P1}f${C0} *** |____/ \___/|_| |_| |_| \_/_/ \_\_/_/ \_\_____| ***${FC}\n"
FANO
}
FANO() {
GERACOR;sleep 0.0625
P1=$(((COLS-53)/2))
sleep 0.25
printf "\e[9;${P1}f${C0} _____ _____ _ ___ _____ ____ ___ _ _____ ${FC}\n";sleep 0.0625
printf "\e[10;${P1}f${C1}| ___| ____| | |_ _|__ / |___ \ / _ \/ |___ |${FC}\n";GERACOR;sleep 0.0625
printf "\e[11;${P1}f${C0}| |_ | _| | | | | / / __) | | | | | / / ${FC}\n";sleep 0.0625
printf "\e[12;${P1}f${C1}| _| | |___| |___ | | / /_ / __/| |_| | | / / ${FC}\n";GERACOR;sleep 0.0625
printf "\e[13;${P1}f${C0}|_| |_____|_____|___/____| |_____|\___/|_|/_/ ${FC}\n\n"
exit 0
}
INIC