comparing 2 directories

i have been asked to write a bash shell script comparing two directories and sed or awk should not be used in this assignment. compdir will compare filenames in two directories, and list information about filenames that are in one directory but not the other. The information listed will be a long listing of each file, similar to the "ls -l" command. The directory names must be specified, including any required absolute or relative paths.

Usage: compdir dir-name1 dir-name2

compdir will work for all kinds of files, including directories that are contained in the specified directories. The script will print an appropriate error message if the number of arguments passed to it is something other than 2, or if the directory names specified are not names of valid existing directories. If an error message is issued, then the script should end with an exit status of 1 (one). Otherwise, it should end with an exit status of 0 (zero).

Here are examples of compdir error messages (directory d1 exists, d2 and d3 do not exist):
$ compdir
Usage: compdir dir-name1 dir-name2
$ compdir d1
Usage: compdir dir-name1 dir-name2
$ compdir d1 d2 d3
Usage: compdir dir-name1 dir-name2
$ compdir d1 d2
d2 is not a valid existing directory
$ compdir d2 d1
d2 is not a valid existing directory
$ compdir d2 d3
d2 is not a valid existing directory
$ compdir d3 d2
d3 is not a valid existing directory

anyone has any tips on how i should do this. im a begginer in scripting. thanks.

read the special rules for homework and repost...