Re: grep puzzle: all files that don't contain pattern
On 2008-10-24, kj <socyl@xxxxxxxxxxxxxxxxx> wrote:
Here's another "grep puzzle". With grep -l one can find the names
of files that match a pattern. And with grep -v one can list all
the lines in the input that do not match a particular pattern.
But how to get the names of all files that *don't* match a pattern
*anywhere* on the file?
After ten seconds of man find:
-L, --files-without-match
Suppress normal output; instead print the name of each
input file from which no output would normally have been printed. The
scanning will stop on the first match.
--
hackerkey://v4sw5hw2ln3pr5ck0ma2u7LwXm4l7Gi2e2t4b7Ken4/7a16s0r1p-5.62/-6.56g5OR
.
Relevant Pages
- Re: grep and operator
... Subject: grep 'and operator' ... grep 'first pattern' and 'second pattern' foofile ... If BRP always appears at the beginning of the line, or rather, the BRP you ... record delimiter and so you may want to switch to awk where you can specify ... (comp.unix.sco.misc) - Re: Search & Replace
... Seems simple enough but I had to fiddle about for ages ... GREP box or not. ... but only if you include it in the pattern. ... TW's excellent colour-coded search and replace fields make it /relatively/ straightforward to spot special characters. ... (comp.sys.mac.apps) - Re: Different way of getting Standard input
... If there are entries in @ARGV (the variable that holds what ... (e.g. grep, wc, sort, etc). ... die "$0 needs a pattern to match with" unless @ARGV; ... cowens@amans:~$ perl grep.pl perl grep.pl ... (perl.beginners) - Re: stat and its exceptions
... match the pattern, ... Please read perldoc perlstyle. ... It's not in the FAQs, ... > I know the grep loads everything. ... (comp.lang.perl.misc) - Re: All the world seems in tune
... both of which use 2-byte pointers into the pattern, ... runs into this limit in grep, and sometimes it's a Real Pain In The ... I'm not going to rewrite it right away. ... fiber splicing kit for the tiny tots to have Fun with just like Daddy (but ... (alt.sysadmin.recovery) |
|