1. Homepage
  2. Exam
  3. [2020] COMP2002 Unix Systems Programming - Final Assessment - Q3 Python Script

[2020] COMP2002 Unix Systems Programming - Final Assessment - Q3 Python Script

This question has been solved
Engage in a Conversation

Question 3 (45 marks)


CourseNana.COM

CourseNana.COM

Write a python script that has the following functionality. CourseNana.COM


CourseNana.COM

CourseNana.COM

1. Unpack the .tar.gz supplied from the command line into a directory named COMP2002/ CourseNana.COM

[user@pc]$ python3 usp.py USP_Final_Assessment_Sample.tar.gz CourseNana.COM

2. Isolate the Student ID of each file inside the archive. These files will be some form of executable, such as a shell script or Python script. CourseNana.COM

3. Change the name of every file inside to be: CourseNana.COM

        <StudentID>_FinalAssessment.<Extension> CourseNana.COM

4. For each student’s file, change the permissions of the file so that it is executable. CourseNana.COM

5. Attempt to execute each student’s file, redirecting stderr to a file called ’errors.out’. This file must contain all errors from all the files, not just the latest error. CourseNana.COM

6. The script must finally output a report of which student files did not exit gracefully along with their exit status. CourseNana.COM

7. Finally, make two compressed files: one for student files that exited successfully, one for student files that did not. CourseNana.COM


CourseNana.COM

Note: Format of File Names within the archive: CourseNana.COM

<StudentID>_attempt_<DateTime>_<FileName>.<Extension> CourseNana.COM


CourseNana.COM

The final page has an example of the directory structure of this. CourseNana.COM


Ensure if at any point something is invalid you notify the user. CourseNana.COM

You may test your script on the sample USP_Final_Assessment_Sample.tar.gz located in the same spot you downloaded this assessment from. [45 marks] CourseNana.COM

CourseNana.COM

CourseNana.COM

Get the Solution to This Question

WeChat WeChat
Whatsapp WhatsApp
COMP2002代写,Unix Systems Programming代写,Curtin University代写,COMP2002代编,Unix Systems Programming代编,Curtin University代编,COMP2002代考,Unix Systems Programming代考,Curtin University代考,COMP2002help,Unix Systems Programminghelp,Curtin Universityhelp,COMP2002作业代写,Unix Systems Programming作业代写,Curtin University作业代写,COMP2002编程代写,Unix Systems Programming编程代写,Curtin University编程代写,COMP2002programming help,Unix Systems Programmingprogramming help,Curtin Universityprogramming help,COMP2002assignment help,Unix Systems Programmingassignment help,Curtin Universityassignment help,COMP2002solution,Unix Systems Programmingsolution,Curtin Universitysolution,