Tim Titus
asked on
Search through files to find matching strings that do NOT contain a prefix
I have roughly 1000 files from a website on my local hard disk. I want to determine if any of these files have:
Thus, if there are any "HREF="http://localhost" entries, it would show up, or any "SRC="http://localhost", it would show up in the results.
Any easy way to do this?
http://localhost
on any line, except skip the ones that have:comment="http://localhost
Thus, if there are any "HREF="http://localhost" entries, it would show up, or any "SRC="http://localhost", it would show up in the results.
Any easy way to do this?
grep http://localhost files | grep -v 'comment="http://localhost'
What O/S ?
»bp
»bp
ASKER
Sorry, Windows 10. I don't have grep.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect! I didn't know findstr existed! Thanks!
Welcome, glad that helped.
»bp
»bp