-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTable_menu.sh
executable file
·83 lines (66 loc) · 2.1 KB
/
Table_menu.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
#! /usr/bin/bash
source ./create_table.sh
source ./list_tables.sh
source ./drop_table.sh
source ./Insert_Table.sh
source ./Select_From.sh
source ./Delete_From.sh
source ./UpdateTable.sh
table_menu () {
while [ true ]; do
select choice in "Create Table" "List Table" "Drop Table" "Insert Into Table" "Select From Table" "Delete From Table" "Update Table" "Quit"
do
case $choice in
"Create Table" )
clear
read -p "Enter table name: " table_name
# call create tabel fun
CreatTable $table_name
break;;
"List Table" )
clear
#call list_table fun
List_Tables
echo "__________________________"
break;;
"Drop Table" )
clear
read -p "Enter table name please: " table_name
#call drop table fun
Drop_table $table_name
break;;
"Insert Into Table" )
clear
read -p "Enter table name please: " table_name
#call insert into func
Insert_Table $table_name
break;;
"Select From Table" )
clear
read -p "Enter table name please: " table_name
#call select from fun
SelectFromTable $table_name
break;;
"Delete From Table" )
clear
read -p "Enter table name please: " table_name
#call delete from fun
Delete_FromTable $table_name
break;;
"Update Table" )
clear
read -p "Enter table name please: " table_name
#call update from fun
UpdateTable $table_name
break;;
"Quit" )
clear
exit
break;;
* )
clear
echo "Invalid Choice"
esac
done
done
}