I'm fairly new to UNIX, but hopefully some-one can help me with this:
I am using the following code to find files with the name "example.xml":
find . -name "example.xml" -print
that would print me a list like the example here:
./dir1/dir2/example.xml
./dira/dirb/example.xml
now here's the riddle for you guys; I want to be able to search in each file returned for the string "Version" and return the following x amount of characters or just that line where the pattern is matched if that is easier.
Try this ^^, it will only print the filename, where the search string is being found.
If that works, try this command without "-l" argument, and it should be that what you're looking for, I hope
Thank you for the quick replies, I'll try this now and let you know!
---------- Post updated at 04:44 PM ---------- Previous update was at 04:36 PM ----------
Thank you all, many way to skin this cat it seems. They all do the job Thank you for expanding on the first reply as the filename in the output has proved very useful.