-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbamby.sh
executable file
·83 lines (54 loc) · 1.46 KB
/
bamby.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
chmod +x method1.sh
chmod +x method2.sh
if ! hash figlet &> /dev/null ; then
sudo apt-get update
sudo apt-get install figlet
fi
figlet "BAMBY"
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
RED='\033[0;31m'
Blue='\033[0;34m'
Light_Blue='\003[1;34m'
Purple='\003[0;35m'
question="${Blue} [${YELLOW}?${Blue}]${NC}"
method1="${YELLOW}[${RED}1${YELLOW}]"
method2="${YELLOW}[${RED}2${YELLOW}]"
echo -e "${RED}is here ;P${NC}"
printf "${question}Please enter the word your want to produce bash script of:"
read the_word
figlet "$the_word" > figlet_file.txt
printf "${question}${YELLOW}Please enter the code of the color you want to select:\n${NC}"
color_code_list=$(<color_codes.txt)
echo "$color_code_list"
printf "${RED}>>${NC}"
read color_code
echo "$color_code" > code.txt
sleep 1
echo "======================================================================================"
value=$(<figlet_file.txt)
Field_Seperator=$IFS
IFS=$"\n"
for n in $value
do
printf "\033[0;${color_code}m${n}"
printf "\\"
sleep 0.5
done
IFS=$Field_Separator
echo ""
echo "========================================================================================="
for (( i=0; i<${#value}; i++ )); do
echo -n "${value:$i:1}"
echo -n "${value:$i:1}" >> new_figlet_file.txt
sleep 0.05
done
echo ""
printf "Choose one option of printing by made scripts:"
printf "$method1 or "
printf "$method2"
echo ""
echo "Thank you for using!!"
sleep 1
exit