shell problem

Hello!
Can you please help me on a lab at school:
I have to to write a shell program which reads all .C files from the current directory and prints for each file how many '#define' directives it has and for each macro defined how many times is it used in that file.

Can you suggest how can i write this program?
Any indication would be much appreciated.

Sorry, there are rules in this forum that prohibit posting homework and similar stuff:

(6) Do not post classroom or homework problems.

You find them in the menu bar close to the top of the forum:
The UNIX and Linux Forums - Forum Rules