I use grep -L
to get a list of files that do not contain a certain string. How can I see the content of those files? Just like:
grep -L "pattern" | cat
You can use xargs
:
grep -L "pattern" | xargs cat
As read in man xargs --> build and execute command lines from standard input
. So it will cat
to those file names that grep -L
returns.
You can use cat
and use the output of grep -L
...
cat $(grep -L "pattern" *.files )