I was wondering if someone could help me understand why am I stuck in the part where the tutorial asks for including 9 comments in the insert_data.sh. I did it as it is says but for some reason the program tells me: Your script should have all the suggested comments added correctly. This is my program:
#!/bin/bash
#Script to insert data from courses.csv and students.csv into students database
cat courses.csv | while IFS="," read MAJOR COURSE
do
# get major_id
# if not found
# insert major
# get new major_id
# get course_id
# if not found
# insert course
# get a new course_id
# insert into majors_courses
done
It helps to plan out what you want to happen. For each loop, you will want to add the major to the database if it isn’t in there yet. Same for the course. Then add a row to the majors_courses table. Add these single line comments in your loop in this order: get major_id, if not found, insert major, get new major_id, get course_id, if not found, insert course, get new course_id, insert into majors_courses.
Here’s an example of a single comment: # <comment>
Add the nine suggested single line comments, each on their own line, in the order given
It should look like this:
do
# get major_id
# if not found
# insert major
# get new major_id
# get course_id
# if not found
# insert course
# get new course_id
# insert into majors_courses
done