Hello and welcome to LinuxQuestions,
This sounds pretty much like homework to me. If it is then you should know that we will not do the work for you. Check the LQ Rules
to which you agreed when signing up:
Do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and searches) and we'll do our best to help. Keep in mind that your instructor might also be an LQ member.
Even if it's not homework, you cannot expect us, who are all volunteers here, to do all the work for you. It all bottles down to:
Show us what you've got and where it's failing and we'll be glad to help.
Some good starting points:
Bash Guide for Beginners
Advanced Bash Scripting Guide
Looking forward to your participation in the forums. Have fun with Linux.