yes, i am looking at counting total no of lines in a code which are commented but not from a single file...it has to be done for abt 100 PL/SQL codes....
Try this:
1. Have a counter = 0
2. Loop through the file, read line by line and grep for /* or *\. Say /* is in 6th Line. Then here counter = 6. Assign this calue to another variable say start_of_line = 6
3. Then cotinue fetching and checking for /* or *\. If you find *\ in 10th line. Now counter = 10, now result=result + (counter - start_of_line));
So result = 0 + (10-6) => 4;
4. Continue for another set of lines in the loop and keep adding to the result. Finally when you reach END OF FILE, you will have the total number of lines in the PLSQL CODE.
Try implementing this logic and let us know in case of any issues.