The first-year module Operating Systems and Procedures requires students to log into a server and
create a specified collection of directories and files in their own area on the server.
A Perl script is required that will mark this assignment and provide suitable feedback to the
students, thus avoiding the delay that would be required if the work were to be marked manually.
The requirements of the OSP assignment are:
*To create a directory shopping with subdirectories fish and fruit; fish sould have subdirectories*
*haddock and shark; fruit should have subdirectories apple and pear. The directory shopping*
*should be readable, writeable and executable by its owner, but the group and other users should*
*have no rights to it. The directory pear should contain a copy of the file /etc/fstab on the server,*
*renamed as pip. The directory apple should contain a file called maggot containing a long listing*
*of the directory /bin on the server. The shark directory should contain a file called bones,*
*consisting of the lines*
*The haddock directory should contain a file called fin containing all the lines of the file*
*/etc/passwd sorted alphabetically by username, followed by all the lines of the file /etc/inittab.*
The marking scheme for the OSP assignment is
*2 marks for having successfully created a user account on the server*
*1 mark for each of the 7 directories that must be created*
*2 marks for setting the correct permissions on the “shopping?? directory*
*3 marks for each of the files “pip??, “maggot?? and “haddock??*
*5 marks for the “fin?? file*
*Total: 25 marks*
The tar archive [url removed, login to view] may be downloaded from *[url removed, login to view]*, and
contains the contents of the students' home directories on the server immediately after the
assignment was completed. It also contains a directory .answers. containing the correct contents.
The archive should be untarred in the directory /home to create the user areas before your script
runs. Your script should examine each user area in turn and generate a report for feedback to the
student, stored as [url removed, login to view] in their home area. It should also produce a report for the lecturer, stored
as [url removed, login to view] in the directory .answers..
Feedback to the students should provide a mark and a comment for each of the 5 parts of the
assignment listed above, together with a total mark. The comment should explain what they have
done wrong, if anything. There should be a header for the report consisting of the words 'OSP
Assignment 1a' together with the students username and the date.
Feedback to the lecturer should contain a list of all student usernames and their marks and also
calculate the number of students who took the assignment and their average mark.
A basic program which checks directories, compares files to the originals, generates approriate
reports with marks and comments to the students and a summary report for the lecturer will obtain a
pass mark. It is not necessary to tackle any of the trickier issues to obtain a pass, but better programs
should try to solve these issues.
should run in linux as this is a perl script