To view all php files containing "abc", I can use this simple script:
find . -name "*php" -exec grep -l abc {} \;
I can omit -l and I extract some of the content instead of the file names as the results:
find . -name "*php" -exec grep abc {} \;
Now I need a version that works simultaneously, but on the same line.
Expected Result:
path1/filename1: lorem abc ipsum
path2/filename2: ipsum abc lorem
path3/filename3: non abc quod
More or less like it grep abc *.
Edit: I want to use this as a simple shell script. It would be great if the exit were on the same line, so further matching would be possible. But it is not necessary that the script be just one line, I still put it in the bash script file.
2: "ack", , grep. . http://betterthangrep.com/ ack --php --nogroup abc,