| As a Test Engineer, I am tasked with finding items buried in C or Ada Source Code, in order to prove that the development team utilized certain customer required data constants. The resultant code inspection can take several hours in doing a manual search, and because I am interested in spending time in other pursuits, I wanted an automatic solution...
This bit of magic was inspired with help from Monks Grandfather and scorpio17 and this is my final solution!
My only unaccomplished bit to this code is I wish I could ignore the @Constants that are in commented lines...where the line begins with a #... My attempts to filter out the commented lines resulted in all source lines being filtered out...
Therefore, here is final_search.pl: the miracle of searching & printing source path, filename, and source code line where used.
If you don't provide a directory path on the command line, it will default to the current directory.
Please feel free to make use of this fine utility!
Thanks to all the Monks who offered solutions to this problem!
UPDATE
I ran into some problems with the initial version of this utility during an actual run in the destination directory. So the code has been updated with suggestions from thezip and tested successfully!
Thanks also to Anno and ikegami and several others in the Chatterbox for your excellent suggestions!
Cheers! :D
pmonk4ever
|