-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
asciibot-min.sh
executable file
·2 lines (2 loc) · 3.42 KB
/
asciibot-min.sh
1
2
#!/usr/bin/env bash
b=${#1};t(){ a=;case $@ in a)a=10;shift;;b)a=11;shift;;c)a=12;shift;;d)a=13;shift;;e)a=14;shift;;f)a=15;shift;;*)a=$*;shift;;esac;};u(){ [ -z $c ]&&c=$((RANDOM%16));[ -z $d ]&&d=$((RANDOM%16));[ -z $e ]&&e=$((RANDOM%16));[ -z $f ]&&f=$((RANDOM%16));[ -z $g ]&&g=$((RANDOM%16));echo -en "${h[$c]}";[ $b == 3 ]&&{ echo -en "${i[$f]}";}||{ echo -en "${j[$f]}";};echo -en "${k[$c]}";[ $b == 3 ]&&{ echo -en "${l[$g]}";}||{ echo -en "${m[$g]}";};echo -e "${n[$c]}";echo -e "${o[$d]}";echo -e "${p[$e]}";exit 0;};v(){ q=("0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "a" "b" "c" "d" "e" "f");r=0;for i in ${q[@]}; do [ $i == $* ]&&r=1;done;};h=(" ___T_ \n | " " \\.===./ \n | " " o___o \n //" " T___ \n |" " )_( \n |" " |---| \n |" " .---. \n } " " Y__ \n _/" " .===. \n //" " _._._ \n -)" " .=._,=. \n ' (" " .-. \n ._(" " ,_,_, \n \\" " .===./\` \n /." " __i \n [" " _ _,_,_ _ \n \\( ");k=(" | \n |__" " | \n \\_" "\\\\ \n |\\_" "| \n \\_" "| \n |_" "| \n |_" " { \n \\_" "\\_ \n \\_" "\\\\ \n \\\\_" "(- \n \\_" ") \` \n _)" ")_. \n (_" "/ \n /_" ".\\ \n \"\\_" "] \n ]" " )/ \n \\_");n=("__| " "_/ " "_/| " "_/ " "_| " "_| " "_/ " "_/ " "_// " "_/ " "(_ " "_) " "_\\ " "_/\\" "[ " "_/ ");o=(" /| []|\\ \n ()/|___|\\() " " o==|ooo|==o \n |___| " " /|(\\)|\\ \n d |___| b " " 7--|=0=|--< \n |___| " " .-._/___\\_.-. \n ; \\___/ ; " "}-. /\\--o/\\ .-{\n \" |___| \"" " .=[::+]=. \n ]=' [___] '=[ " " )=o=|L88|=o=( \n )=o=|___|=o=( " " ,=|x|=. \n 'c/_\\ 'c " "()ooo|\\=/|ooo()\n |___| " ".'c .\"|_|\". n\`.\n'--' /_\\ \`--'" " .=(+++)=. \no=\" (___) \"=o" " ,\"|+ |\". \n _\\|+__|/_ " " (m9\\:::/\\ \n /___\\6 " " >===]__o[===< \n [o__] " " .==|>o<|==:=L\n '=c|___| ");p=(" |_|_| \n /_|_\\ " " .'._.'. \n |_| |_| " " . \\_/ . \n . .:::.. . " " // \\\\ \n _\\\\ //_ " " ( ) \n __) (__ " " .\". \n |_| " " /| |\\ \n [_] [_] " " . /___\\ . \n. ..:::::::. ." " /| |\\ \n (0) (0) " " |_| \n (ooo) " " _// \\\\_ \n /_o| |o_\\ " " (_|_) \n (o|o) " " / | \n _\\ |_ " " [] [] \n /:] [:\\ " " ]| |[ \n [_| |_] " " /7 [| \n \\/7 [|_ ");j=("o o" "p q" "q p" "d b" "b d" "ooo" "[o]" "9 9" "6=6" "u u" "n n" "q q" "d d" "- -" "0 0" "O O");i=("o o" "b d" "0-0" "[o]" "ooo" "6=6" "- -" "o o" "d d" "o o" "q q" "u u" "9 9" "n n" "p q" "q p");m=("-" "=" "o" "O" "0" "#" "u" "v" "n" "r" "\`" "^" "A" "@" "e" "E");l=("-" "=" "-" "-" "#" "o" "0" "o" "u" "=" "-" "-" "-" "=" "-" "\"");[ $b == 5 ]&&{ s=("${1:0:1}" "${1:1:1}" "${1:2:1}" "${1:3:1}" "${1:4:1}");for i in ${s[@]}; do v $i;[ $r == 0 ]&&u;done;for i in {0..4}; do t ${s[$i]};case $i in 0)g=$a;shift;;1)f=$a;shift;;2)c=$a;shift;;3)d=$a;shift;;4)e=$a;shift;;esac;done;};[ $b == 3 ]&&{ s=("${1:0:1}" "${1:1:1}" "${1:2:1}");for i in ${s[@]}; do v $i;[ $r == 0 ]&&{ b=0;u;};done;for i in {0..2}; do t ${s[$i]};case $i in 0)f=$a;g=$a;c=$a;shift;;1)d=$a;shift;;2)e=$a;shift;;esac;done;};u