Thx for the code.
I tried it and got no hits, but when I change the && operator to || then it returns the file twice as if it was searching twice, once for each part of the condition.
Any ideas why the && wouldn't work? These are not in the same line, but exist in the same file.
Regards,...
User Profile
Collapse
-
search for an occurence of two text in a list of files
I'm trying to find files in the current directory that have the occurence of '<IWM_Datasourc e>NOUID</IWM_Datasource> ' AND '<IWM_HasMetaDa ta>true</IWM_HasMetaData >'.
I was able to find just the first text like this:
find . -name '*Base*xml' -type f -exec egrep -l ^.*'<IWM_Dataso urce>NOUID</IWM_Datasource> '$ {} /dev/null \;
But when I try to add the second text I don't seem to...
No activity results to display
Show More
Leave a comment: