• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 291
  • Last Modified:

RegEx needed to check for files not containing a string

I've got a set of .COM files in various directories
I'd like a RegEx (Run with Perl) which will check each .COM file in all subdirectories
And indicate which files do not contain a certain string, "version"
Any advice much appreciated, not quite sure where to start
Thanks
0
mike99c
Asked:
mike99c
1 Solution
 
ozoCommented:
perl -MFile::Find -le 'find(sub{(/\.COM$/&&-f)||next;local@ARGV=($_);/version/&&return while <>; print $File::Find::name},".")'
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now