-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.sh
More file actions
executable file
·50 lines (44 loc) · 1007 Bytes
/
main.sh
File metadata and controls
executable file
·50 lines (44 loc) · 1007 Bytes
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
#!/usr/bin/bash
clear
keep_alive=true
#calling helper functions
. ./helperfunctions.sh
#loading colors file
. ./colors.sh
while [[ $keep_alive=true ]]; do
echo
echo -e "${YELLOW}Welcome to Bash DataBase Engine!"
echo "********************************"
echo
echo "Simple Database System Written in Bash"
echo "This Engine Support Basic CRUD Operations"
echo "Please Note Only Supported Datatypes are Int, Str, And Alphanumeric"
echo
echo -e "${LBLUE}Author : Muhammad Majid Kamel${YELLOW}"
echo
echo "********************************"
echo -e "${NC}"
echo "1.Create Database "
echo "2.Use Existing Database "
echo "3.Delete a Database "
echo "4.Display a Database "
echo "5.Exit "
echo
echo -ne "${PROMPT}Enter your choice : ${NC}"
read choice
case $choice in
1 )
. ./create_db.sh;;
2 )
. ./use_db.sh;;
3 )
. ./delete_db.sh;;
4 )
. ./display_db.sh;;
5 )
echo "Bye Bye :("
exit;;
* )
echo -e "${RED}Please Enter A Valid Choice!!${NC}";;
esac
done