Hello I want to create an interactive bash file while using a text file how can I make it work like if the user presses 1 it gives him a full list of names from this text file For example I'm struggling in
- List all
- Display Info
- Count Students
- Delete Student
- Backup
- Exit List all: if the assistant choose this option, information (first line of each file) about all the students is displayed, one student per line, sorted in alphabetical order according to student surname.
Display Info: if the assistant choose this option, a file containing all Students ID, Major and GPA is created and displayed (one student per line).
Delete Student: if the assistant choose this option, he/she will prompted to enter the ID of the student to delete its file from the database. Add conditions to check the valid format for student ID (9 digits long).Return a warning message if the ID doesn’t exist.
Count: if the assistant choose this option, the number of students per major is displayed in a reverse numerical number.
Backup: if the assistant choose this option, a backup folder for the students’ database is created with the date, at the time of the operation, added to the name of the folder 2 (CurrentStudents.Date). The date must have the following format day_FullMonthName_Last2DigitsYear.
Exit: if the assistant choose this option, the program terminates.
Also,The menu is displayed again after each option except the Exit option which terminates the program. Any invalid choice from the menu, will display a message informing the user of the invalidity of the choice and prompts for it again. There are two ways to end the program normally: either by having the user choose the Exit option or when an invalid choice is entered more than 3 times. Help is really appreciated
1
", like "qwertyuiop"? – waltinator Apr 16 '21 at 21:58