mbiti2 / Student-s_projects

This project is arned at creating an algorithm to select students for the LPI exams.
0 stars 2 forks source link

Script does not start normally #4

Open Motouom opened 2 weeks ago

Motouom commented 2 weeks ago

When i run the script, it starts by aksing me if i want to continue, which is this part of the code

while true
do
 read -p "Do you want to continue : " yeah
 if [ "$yeah" = "y" ]; then
    welcome ; accept_student
else
    echo "thanks for using this app"
    break
 fi
done

This part is the end when the user finishes to do what so ever he/she want to do and the script asks if she want to continue or exit. but it is instead the begining with is a problem.

If i understand your script well, then this should be the begining of your script

welcome() {
echo -e "Hello Welcome to GIS STUDENT registration for the examms\n\a"
echo -e "Please Enter \n1 To include your name in the list\n2 To see the other students in the list\n3 To reset database \n4 To exit \n5 To select student for the exams\n\a" 
read -p "Enter : " chioce
}

Please implement this correction.