Python
from __future__ import print_function
import glob
for name in glob.glob('*.*'):
with open(name,'r') as aFile:
for n, text in enumerate(aFile):
if 'some text' in text:
print( name, n, text )
re.
Instead of printing the results, you can create a database shelveor other index structure.
source
share