shell - How to list all files that do not contain two different strings -
list files not contain 2 different strings
i have dir numerous files named in pattern e.g file1.txt
i can list files not contain 1 string
grep -l "string" file*
how can list files not contain 2 strings tried?
grep -l "string1|string2" file*
you need parameter e
grep, or using egrep.
with egrep:
egrep -l "string1|string2" file*
shell scripting grep
No comments:
Post a Comment