#! /bin/csh -f # Make a report containing the data from a survey that the students completed. set survey = Your_work_habits__skills__and_preferences_--_for_choosing_teams set dataFieldNames = (RESPONSE_ID NAME USERNAME DATE_SUBMITTED FIELD_ED6B6FFA9BCF49BBAB1091226C0324EF FIELD_2B49BF091A224DF38128E9A3FBBC7956 FIELD_070EDF82D85A43FFB51FCDF475E3E2BD FIELD_4AF5138C3F2A4ABC90A5705DDEF99758 FIELD_C8887F8675E54801A9A64860B774DBD3 FIELD_66A13DACE9CF4D6082953F5FFEB3ED91 FIELD_9444523A2F9746438E7AE19F5913E03E FIELD_6235CF4D8B3D47F7A698A0ED8A496CD1 FIELD_4B22220CC95748DDAEA2A93AB6023026 FIELD_F68CE5CA3AAE4BA8A247BB9A83E18C50 FIELD_E763391FABE44729ADF16BE647C9F54D FIELD_D098658546FB4D0FB9ECF42F8758B10E FIELD_232270F21DA44E9683935143AC613E59 FIELD_AD7F4EFC279644D8B9ECAC0DBFEF7CDB FIELD_09643A128B0C4BDFA410E63B7F828337 FIELD_CE16363EF4534C2394F3850759ADC3F9 FIELD_3380A27B93F34CEDA57FED8212259C92 FIELD_785F0422BF774FB9A624CA0EC7711555 FIELD_BFE8B2D93975414F915D91754E8059E3 FIELD_E6619641C2714AA1B50DDEC7AB54612F FIELD_85F3D95A83284FB0BBF6C9C2E38F3891 FIELD_D04D32B372EF4E0B8A99242963EF35D0 FIELD_AE1A63FFE7924B1494D4BA547BC6AA4B FIELD_D9AC6734823F4A1090B4A119FC058F79 FIELD_94D04B42989F470A840795AF97B98562 FIELD_89CF795BDEC14475ADE977956CD90FE0 FIELD_433BDA91B7E840898D9FA1F15987EA95 FIELD_48D99D0524584DD2B9DD020743606D80) set reportFieldNames = ( \ "RESPONSE ID" \ NAME \ USERNAME \ DATE_SUBMITTED \ "I LIKE TO WORK:" \ "I LIVE AT:" \ "I AM (very unorganized, somewhat unorganized, usually organized, very well organized):" \ "I AM (undependable-unresponsible, often not dependable-responsible, usually dependable-responsible, always dependable-responsible):" \ "MY CHOICE:" \ "MY CHOICE:" \ "I WORK WELL UNDER PRESSURE (Strongly disagree, Disagree, Agree, Strongly Agree):" \ "I LIKE TO WORK UNDER PRESSURE (Strongly disagree, Disagree, Agree, Strongly Agree):" \ "FOR THIS PROJECT, I EXPECT TO WORK (Not too hard, Hard, Very hard, Very very very hard):" \ "HOURS NEEDED ON THIS PROJECT EACH WEEK:" \ "I AM AVAILABLE FOR MEETINGS (1 = 'not available at all', 5 = 'very available'):" \ "MANAGEMENT STYLE I WANT FROM TEAM LEADER:" \ "PROGRAMMING LANGUAGES I KNOW:" \ "IDEs and FRAMEWORKS I KNOW:" \ "AT GATHERING REQUIREMENTS, I AM (much worse than, somewhat worse than, about the same as, somewhat better than, much better than) most of my CSSE 371 classmates:" \ "AT WRITING SPECIFICATIONS, I AM (much worse than, somewhat worse than, about the same as, somewhat better than, much better than) most of my CSSE 371 classmates:" \ "AT SOFTWARE DESIGN, I AM (much worse than, somewhat worse than, about the same as, somewhat better than, much better than) most of my CSSE 371 classmates:" \ "AT CODING, I AM (much worse than, somewhat worse than, about the same as, somewhat better than, much better than) most of my CSSE 371 classmates:" \ "AT DEBUGGING, I AM (much worse than, somewhat worse than, about the same as, somewhat better than, much better than) most of my CSSE 371 classmates:" \ "AT WRITING TEST CASES, I AM (much worse than, somewhat worse than, about the same as, somewhat better than, much better than) most of my CSSE 371 classmates:" \ "AT COMMUNICATING IN PERSON, I AM (much worse than, somewhat worse than, about the same as, somewhat better than, much better than) most of my CSSE 371 classmates:" \ "AT EXPRESSING MYSELF IN WRITING, I AM (much worse than, somewhat worse than, about the same as, somewhat better than, much better than) most of my CSSE 371 classmates:" \ "RELEVANT EXPERIENCE:" \ "I ENJOY: (Talking with a client, Documenting code, Designing graphical user interfaces, Implementing graphical user interfaces, Writing AIs for games, Coding, Figuring out the best algorithm for a complicated problem, Doing UML class design, Meeting with teammates, Debugging, Writing test cases):" \ "MY FAVORITE PROGRAMMING LANGUAGE AND ENVIRONMENT IS:" \ "I ESPECIALLY LIKE:" \ "I WOULD LIKE ON MY TEAM:" \ "ANYTHING ELSE:") # set survey = Your_project_preferences_--_for_choosing_teams # set dataFieldNames = (RESPONSE_ID NAME USERNAME DATE_SUBMITTED FIELD_862716B9ED6D4FF68F5D34C0982B1A70 FIELD_9569F5A68B8E484B89ECFC88F4F47765 FIELD_8515A98760974F26B28E7DE84FEAAC94) # set reportFieldNames = ( \ # "RESPONSE ID:" \ # "NAME:" \ # "USERNAME:" \ # "DATE SUBMITTED:" \ # "PREFERRED PROJECTS:" \ # "PREFERRED TEAM LEADERS:" \ # "ANYTHING ELSE:") set section = 01 set surveysFolder = ../SurveyResults set surveyData = $surveysFolder/${survey}.csv set surveyReport = $surveysFolder/${survey}-${section}.txt echo $surveyData echo $surveyReport set temp1 = /tmp/surveyReport1-$user set temp2 = /tmp/surveyReport2-$user # -------------------------------------------------------------- # Produce a report that lists, for each survey submitted, # the answers to the survey questions. # -------------------------------------------------------------- cat $surveyData \ | egrep -f students-$section \ | sed 's/ //' \ | sed 's/"//' \ | sed 's/","/ /g' \ | sed 's/"$//' \ | awk -F\t -f makeSurveyReport.awk \ >! $temp1 foreach dataFieldName ($dataFieldNames) set reportFieldName = "$reportFieldNames[1]" shift reportFieldNames echo $dataFieldName $reportFieldName sed "s/$dataFieldName/${reportFieldName}/" $temp1 >! $temp2 /bin/mv -f $temp2 $temp1 end awk ' /RESPONSE ID/ {printf("\n")} {print}' $temp1 >! $surveyReport /bin/rm -f $temp1