Results 1 to 3 of 3
Need to make sure a security line is added in to every webpage on a site, trying to find out how to list only the filenames of the pages that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-19-2010 #1Just Joined!
- Join Date
- Feb 2007
- Posts
- 4
How to find files with missing text
Need to make sure a security line is added in to every webpage on a site, trying to find out how to list only the filenames of the pages that are missing the text.
awk or grep?
So what I want is to list all files NOT containing the word 'securemasthead'
- 10-19-2010 #2Just Joined!
- Join Date
- Feb 2006
- Posts
- 7
use grep. -L is the option you want to use:
if you need to grep in a directory structure, also add -R optionCode:$ echo 'test1' > test1.txt $ echo 'test2 securemasthead' > test2.txt $ grep -L securemasthead * test1.txt $ grep -l securemasthead * test2.txt
- 10-19-2010 #3Just Joined!
- Join Date
- Feb 2007
- Posts
- 4
Perfect, thanks!


Reply With Quote
