Currently I am using grep as follows:
grep -lr <PATTERN> .
This gives me the following output, containing a list of all files whose contents (not name) contain :
./path/to/file1 ./path/to/file2 ...
This is okay but knowing the line numbers would be useful. The following output would be ideal but having gone through the man page for grep, I can't seem to figure out the right switches:
./path/to/file1 15, 22, 54 ./path/to/file2 16, 17 ...
Is this possible with grep or some other tool?