Bash Programming

Write a Shell script to analyse the disk usage of students in a particular class.
The program should allow the user running the script to input the particular class name (group name) as an argument to the script.
The script should create a file called �logfile� in the home directory of the user running the script. The first line of logfile should contain the heading:
�List of members of class �classname� on �today's time and date�
For each member of the class, the script should record in the logfile on separate lines:
The username
The total number of files in the student's home directory
The total disk space used by the student
The last line of the logfile should contain the total number of students found in the class.

The information which you need on usernames, groupnames and group id's is contained in two files.
The first file is /etc/group. This file has a line for each group (class) containing the following information:
groupname:password:groupid:secondary members. The file uses colon : as a field separator.
The second file is /etc/passwd. This file has a line for each user containing the following information:
username:x:userid:groupid:comments:home directory:default shell. The file also uses colon : as a field separator.

I'm sorry, we can't offer help on homework questions, as per the forum rules.

Thread closed.

nothing to be sorry about - the rules are rules!