DEV Community

Discussion on: How to find a specific String in file content with specific file name in specific folder ?

Collapse
 
lbonanomi profile image
lbonanomi

Please consider handling whitespace:

find . -name "*.properties" -print | while read file
do
    grep default.session.timeout=600 "$file"
done
Collapse
 
gochev profile image
Nayden Gochev

that can be handy for someone thanks :D:D:D btw I have never had to search for something with spaces, but I can imagine for translations and other stuff that this can be handy :)