shell script that will automatically check if specifed user is log in or not, in 30 seconds

guys I need emergency help with below shell script assignment..am new to shell script

[LEFT]Write a Shell script to automatically check that a specified user is logged in to the
computer.
The program should allow the person running the script to specify the name of the
user to be checked, the frequency in seconds at which the script should check. If a
checking frequency is not specified, it should default to 60 seconds
The script should check for the specified user and if found should output a message
with a �beep� or �bell� sound to the screen stating that the user is logged in. It should
also output a message to a log file stating that the user is logged in and specifying the
date and time.
If the user is not logged in the script should output a message without any �beep�
sound to the screen stating that the user is not logged in.
The script should allow a person running the script to specify the user name on the
command line and optionally, a check frequency in seconds and a third argument �q�
�q� . If �q� is present as a third argument, The script should omit any output to the
screen or �beep� sound but should log to a log file the message stating that the user is
logged in and giving the time.
The command to run the script would be as follows:
checklogin username 30 q where �checklogin� is the script name, �username� is the
name of the user, �30� is the optional frequency to check in seconds, and �q� is the
optional argument to suppress screen output.
The script should check that the number of arguments supplied is between 1 and 3 and
if it is not, should terminate with an error message showing the correct syntax for the
command.
You will be required to make a demonstration in the lab on how your program is
working. You will be required to produce a printed copy of your shell on the same
day. After your demonstration , make a directory in your home directory called
�assignment� and copy your shell script program to it. Give your program a unique
name beginning with your username �usernamelinuxshell' Your name, student
number and course you are taking must appear at the top of your program. It is[/LEFT]
important to make sure that the program is fully documented.

you are expecting us to do your homework? what have you started with? revise your textbooks if needed.

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.