The cut
in your command suggests that you're looking to list files matching the specified string.
find . ! -path "*/manual/*" ! -path "*/include/*" -type f -exec grep -Fl 2.2.24 {} \;
should work for you.
سؤال
I'm trying to grep -R an exact version of apache.
I leave the include and the manuals, because its not necessary to change.
This is the command I'm using:
grep -R 2.2.24 * | grep -v manual | grep -v include | cut -d':' -f 1
I would like to know how to find one result per file?
Thanks
المحلول
The cut
in your command suggests that you're looking to list files matching the specified string.
find . ! -path "*/manual/*" ! -path "*/include/*" -type f -exec grep -Fl 2.2.24 {} \;
should work for you.