-
Notifications
You must be signed in to change notification settings - Fork 0
/
useDB.sh
42 lines (42 loc) · 985 Bytes
/
useDB.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
#!/bin/bash
if [ $# -eq 0 ]
then
clear
echo $'\n --DATABASES EXISTING--'
ls -d */
echo -n $'\nEnter Database name: '
read name
cd $name
clear
echo "use "$name ">>"
# else
# cd $1
# echo "use "$1 ">>"
#
fi
PS3=$'\nPlease enter your choice: \nPress Enter If Menu doesnot apper\n'
echo $'\n * OPERATIONS MENU:\n'
select opt in "Create New Table" "Drop Table" "Select from Table" "Delete from Table" "Update date" "Back to Menu"
do
case $opt in
"Create New Table")
.././createTable.sh
;;
"Drop Table")
.././dropTable.sh
;;
"Select from Table")
.././selectFromTable.sh
;;
"Delete from Table")
.././deleteFromTable.sh
;;
"Update Table")
.././updateTable.sh
;;
"Back to Menu")
exit
;;
*) echo invalid option;;
esac
done