Chris Devers wrote:
On Fri, 30 Jul 2004, Andrew Gaffney wrote:
I think it is a problem with the regex. If I change it to:
grep -RLi '%init' * | grep '.html'
I get all files that don't have '%init', but it doesn't work with
the '%(init|perl)'. That regex doesn't seem to match anything.
More man
I need to get a list of all the files that end with '.html' in a directory and
all of its subdirectories. I then want to search through each file and remove
the ones from the list that contain '%perl' or '%init'. How can I do this?
Thanks for any help.
--
Andrew Gaffney
Network Administrator
Andrew Gaffney wrote:
I need to get a list of all the files that end with '.html' in a
directory and all of its subdirectories. I then want to search
through each file and remove the ones from the list that contain
'%perl' or '%init'. How can I do this? Thanks for any help.
Use
On Fri, 30 Jul 2004, Andrew Gaffney wrote:
I need to get a list of all the files that end with '.html' in a
directory and all of its subdirectories. I then want to search through
each file and remove the ones from the list that contain '%perl' or
'%init'. How can I do this? Thanks for any help.
On Fri, 30 Jul 2004, Andrew Gaffney wrote:
I think you misunderstand. I don't want to delete the files that
contain '%perl' or '%init'. I just want to make a list of all
.html files in a directory tree and remove the ones that contains
'%perl' or '%init' from my list.
Then yes, I misunderstood.
Chris Devers wrote:
On Fri, 30 Jul 2004, Andrew Gaffney wrote:
I think you misunderstand. I don't want to delete the files that
contain '%perl' or '%init'. I just want to make a list of all
.html files in a directory tree and remove the ones that contains
'%perl' or '%init' from my list.
Then
On Fri, 30 Jul 2004, Andrew Gaffney wrote:
Chris Devers wrote:
On Fri, 30 Jul 2004, Andrew Gaffney wrote:
Then yes, I misunderstood. This version should do what you want:
$ find /path/to/htdocs -type f | xargs egrep -liv '%(perl|init)'
That still doesn't appear to do what I want. I believe it
In DOS:
perl -n0 -e push @b, $ARGV unless /%(?:perl|init)/; END{print \@b\}
file1.html file2.html file3.html
In *nix (untested):
perl -n0 -e 'push @b, $ARGV unless /%(?:perl|init)/; END{print @b}'
*.html
Andrew Gaffney [EMAIL PROTECTED] wrote in message That still
doesn't appear to do what I
Chris Devers wrote:
On Fri, 30 Jul 2004, Andrew Gaffney wrote:
Chris Devers wrote:
On Fri, 30 Jul 2004, Andrew Gaffney wrote:
Then yes, I misunderstood. This version should do what you want:
$ find /path/to/htdocs -type f | xargs egrep -liv '%(perl|init)'
That still doesn't appear to do what
On Fri, 30 Jul 2004, Andrew Gaffney wrote:
I think it is a problem with the regex. If I change it to:
grep -RLi '%init' * | grep '.html'
I get all files that don't have '%init', but it doesn't work with
the '%(init|perl)'. That regex doesn't seem to match anything.
More man page material: I was
10 matches
Mail list logo