I have to find some words in a lot of log files after I've run a failed build.
- If I do that:
grep -r "myword"
I have too much responses. I don't want to search all the files in all the sub directories.
- If I do that:
grep -r "myword" *.xml
It works because I have an *.xml file in current directory, but I have no responses because... it's not that kind of file I'm searching for.
- If I do that:
grep -r "myword" *.log
It responds:
No file or directory of that type
because there's no log file in the current directory.
But there are plenty of them, below, in target subdirectories. (a find . -name *.log will list me them).
How shall I write the grep command to achieve the result I want?
I've tried to end my command with a variety of *.log, .log, **/*.log, */**/*.log, but without success.