msoliver
(usa Debian)
Enviado em 24/12/2015 - 18:49h
Um Ótimo Natal para todos!
#!/bin/bash
#PS: Parte do meu script "SORTEIO AMIGO SECRETO"
ROWSCOLS() {
COLS=$(tput cols)
ROWS=$(tput lines)
}
GERACOR() {
COR=$(($RANDOM %255))
if [ $COR -eq 0 ];then ATB=1
#ELIMINA CORES QUE NÃO APARECEM NO FUNDO PRETO
elif [[ $COR == +(16|232|233|234|235|236) ]];then GERACOR
else
ATB=$(($RANDOM %2 + 0))
IC="\033[$ATB;38;5;${COR}m"
FC="\x1B[m"
fi
}
FNATAL() {
ROWSCOLS
clear
POS1=$(((COLS-67)/2))
for X in {1..6};do
GERACOR;sleep 0.05
printf "\e[2;${POS1}f${IC} _____ _____ _ ___ _____ _ _ _ _____ _ _ _${FC}\n";GERACOR;sleep 0.1
printf "\e[3;${POS1}f${IC}| ___| ____| | |_ _|__ / | \ | | / \|_ _|/ \ | | | |${FC}\n";GERACOR;sleep 0.1
printf "\e[4;${POS1}f${IC}| |_ | _| | | | | / / | \| | / _ \ | | / _ \ | | | |${FC}\n";GERACOR;sleep 0.1
printf "\e[5;${POS1}f${IC}| _| | |___| |___ | | / /__ | |\ |/ ___ \| |/ ___ \| |___ |_|${FC}\n";GERACOR;sleep 0.1
printf "\e[6;${POS1}f${IC}|_| |_____|_____|___/_____| |_| \_/_/ \_\_/_/ \_\_____| (_)${FC}\n";sleep 0.1
LIMPA
done
FIM
}
FIM() {
GERACOR
POS1=$(((COLS-71)/2))
sleep 0.05
printf "\e[2;${POS1}f${IC} ____ ___ __ __ _ _ _ ___ _ _ _____ _____ _ ${FC}\n";GERACOR;sleep 0.1
printf "\e[3;${POS1}f${IC}| __ ) / _ \| \/ | / \ | \ | |/ _ \ | \ | |/ _ \ \ / / _ \ | |${FC}\n";GERACOR;sleep 0.1
printf "\e[4;${POS1}f${IC}| _ \| | | | |\/| | / _ \ | \| | | | | | \| | | | \ \ / / | | | | |${FC}\n";GERACOR;sleep 0.1
printf "\e[5;${POS1}f${IC}| |_) | |_| | | | | / ___ \| |\ | |_| | | |\ | |_| |\ V /| |_| | |_|${FC}\n";GERACOR;sleep 0.1
printf "\e[6;${POS1}f${IC}|____/ \___/|_| |_| /_/ \_\_| \_|\___/ |_| \_|\___/ \_/ \___/ (_)${FC}\n\n"
}
LIMPA() {
ESP=" "
printf "\e[2;${POS1}f$ESP\n"
printf "\e[3;${POS1}f$ESP\n"
printf "\e[4;${POS1}f$ESP\n"
printf "\e[5;${POS1}f$ESP\n"
printf "\e[6;${POS1}f$ESP\n"
}
FNATAL
Att.:
Marcelo Oliver