FWIW, and this may not apply to you but, homework assignments usually aren't given to make you Bash your head against the wall so to speak but to practice things you learnt, so if this is one of those assignments you might want to read back what's been talked about. You could start by reading some tutorials and walkthroughs like
BASH Programming - Introduction HOW-TO,
http://www.tldp.org/LDP/Bash-Beginne...tml/index.html and the
Linux Shell Scripting Tutorial - A Beginner's handbook. Once you've read that you could try looking at some scripts here:
Bash Shell Scripting Directory For Linux / UNIX and see if you can understand what they're doing.