I am working on a multitude of projects involving codes in Fortran. They are in a directory tree involving 10 to 20 folders, each of the codes is in a 'src' folder.What I am looking for is a simple command that I could run at the root of the arborescence to go fetch all relevant information about the programs. This information is commented in the head of the .f or .f90 files, but of course it can run on a different number of lines in each file.A difficulty is that it is not always at the very head of the file, since there are sometimes modules first. But the information always recalls the name of the file, or at least contains the word 'main'.More precisely, let's say the arborescence is as follows :/|-folder1/     |-program1.f|-folder2/     |-program2.f90In program1.f I need the following block :cc program1 does the followingc blah blahc(this might be a capital C)and in program2.f90 I need the following :!! program2 does the following! blah blah!Perhaps, there is a regular expression which could be used to fetch the full notice block?
Concatenate all commentary about source files in a directory tree
bash;programming