#Done by Oksana, Cesar, and Rene #Comments: Make sure that you understand the questions and answer accordingly. IF there is #anything that is not clear to you, then clarify with me before you proceed to answer it. #Otherwise, you will npt get full credit if your answer does not fit the question. #1. remove all rows that contain the word "_total" rows have leading white space. the other does not (in the col) more DER.csv | sed '/TOTAL/d' > DER1.csv #Comments: I believe that we agree to let the user enter the Instructor's anme instead of #hardcoding the Instructor's name in your code. This makes your code very rigid. #*2. issue a command so that it will return classes taught by a specific instructor: subject, catalog #, section, description, start and end time, location and name of instructor grep "Abbott Russell" DER1.csv | awk -F, '{print $1 $2 $3" " $16" " $18" " $19" " $20" "$21" "$22}' > DER2.csv #any instructor name maybe put in place of "Abbott Russell" #Comments: Good! #3. get the total units taught by this instructor. grep "Guo Jiang" DER1.csv | awk -F, '{name=$22; (tot+=$25)}; END{print "Total Units " name " is teaching is " tot}' > units.txt #grep "Abbott Russell" DER1.csv | awk -F, '{name=$22; (tot+=$25)}; END{print "Total Units " name " is teaching is " tot}' > units.txt #Comments: OK, but the resulting file is NOT a csv file. #4. clean up all white space in field number 2 nawk -F, '{ gsub("^ *","",$2); gsub(" *$","",$2); gsub(" *"," ",$2); print $0 }' DER1.csv > DERT.csv #(or awk) #Comments: Your script should show me the values of these two fields and better yet, show me why they #don't match. #5. check the total of enrolled students against the value of the field COUNT want to know how many are not matched nawk -F, '{if((($4+$6)/$23)!~$9) print "no match at line " NR}' DER1.csv > DERm.csv