Re: getting list of all .html files in a directory and its directories

2004-07-30 Thread Andrew Gaffney
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

Re: getting list of all .html files in a directory and its directories

2004-07-30 Thread Chris Devers
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

Re: getting list of all .html files in a directory and its directories

2004-07-30 Thread Andrew Gaffney
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

Re: getting list of all .html files in a directory and its directories

2004-07-30 Thread Zeus Odin
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

Re: getting list of all .html files in a directory and its directories

2004-07-30 Thread Chris Devers
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

Perl df modules advice

2004-07-30 Thread Ohad Ohad
Hey, I found 3 modules that are used for df on cpan Filesys::DiskFree Filesys::DiskSpace Filesys::Df I need to run it on various systems (mainly Linux, Sun, HP) Anyone had any experiance with those? Which is the most reliable and easy to use? Thanks _

Re: getting list of all .html files in a directory and its directories

2004-07-30 Thread Andrew Gaffney
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.

Re: problem with splitting on "words"

2004-07-30 Thread John W. Krahn
Charlotte Hee wrote: On Fri, 30 Jul 2004, Bob Showalter wrote: OK. Instead of using split, why not capture the tokens you're interested in. Something like: for my $w ($title =~ /([A-Za-z]+[^A-Za-z\s]*)\s*/g) { Let me see if I understand this expression: [snip] \s*/g This matches a blank space z

Re: getting list of all .html files in a directory and its directories

2004-07-30 Thread Chris Devers
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 misunde

Re: getting list of all .html files in a directory and its directories

2004-07-30 Thread Andrew Gaffney
Chris Devers wrote: 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 thi

Re: getting list of all .html files in a directory and its directories

2004-07-30 Thread Chris Devers
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 he

RE: getting list of all .html files in a directory and its directories

2004-07-30 Thread Wagner, David --- Senior Programmer Analyst --- WGO
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

getting list of all .html files in a directory and its directories

2004-07-30 Thread Andrew Gaffney
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 Administrato

RE: problem with splitting on "words"

2004-07-30 Thread Bob Showalter
Charlotte Hee wrote: > On Fri, 30 Jul 2004, Bob Showalter wrote: > > for my $w ($title =~ /([A-Za-z]+[^A-Za-z\s]*)\s*/g) { > > > > That's amazing! Yes, that works. > > Let me see if I understand this expression: > /([A-Za-z]+ > This matches any letter, uppercase or lowercase, 1 or more times

RE: problem with splitting on "words"

2004-07-30 Thread Charlotte Hee
On Fri, 30 Jul 2004, Bob Showalter wrote: > Date: Fri, 30 Jul 2004 13:52:57 -0400 > From: Bob Showalter <[EMAIL PROTECTED]> > To: 'Charlotte Hee' <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: RE: problem with splitting on "words" > > Charlotte Hee wrote: > > Hi Bob, > > > > In one of my

RE: problem with splitting on "words"

2004-07-30 Thread Bob Showalter
Charlotte Hee wrote: > Hi Bob, > > In one of my tests I added the '>' to the character class [^\w->] but > I still didn't get 'B0->'. I'm guessing it's because that looks like a range. Using [^\w\->] should work. > I've just learned about character classes > so I am trying to get a better handl

RE: howto 'cat file|grep "foo bar"|wc -l' in perl

2004-07-30 Thread Bakken, Luke
> > Hello, > > > > I just started using perl and want to rewrite a simple bash > > script i've been > > using in the past to perl. > > > > I want to cat file|grep "foo bar"|wc -l and tried it the > > following way which > > worked for foobar as one word and not as two words. > > > > --- > > #!

RE: problem with splitting on "words"

2004-07-30 Thread Charlotte Hee
Hi Bob, In one of my tests I added the '>' to the character class [^\w->] but I still didn't get 'B0->'. I've just learned about character classes so I am trying to get a better handle on how they work. A lot of my titles contain physics terms like B0->K- and I would consider 'B0->' a word and '

RE: howto 'cat file|grep "foo bar"|wc -l' in perl

2004-07-30 Thread Bakken, Luke
> Hello, > > I just started using perl and want to rewrite a simple bash > script i've been > using in the past to perl. > > I want to cat file|grep "foo bar"|wc -l and tried it the > following way which > worked for foobar as one word and not as two words. > > --- > #!/usr/bin/perl > $logfile

RE: problem with splitting on "words"

2004-07-30 Thread Bob Showalter
Charlotte Hee wrote: > Hello All, > > I am having trouble splitting words from titles from a list of > research papers. I thought I could split the title into words like so: > > #!/usr/local/bin/perl > use locale; > > %forums = ( 1 => 'B0->K+K-Ks', > 2 => 'B+->K+KsKs Decays',

problem with splitting on "words"

2004-07-30 Thread Charlotte Hee
Hello All, I am having trouble splitting words from titles from a list of research papers. I thought I could split the title into words like so: #!/usr/local/bin/perl use locale; %forums = ( 1 => 'B0->K+K-Ks', 2 => 'B+->K+KsKs Decays', 3 => 'Measurement of the

'cvs remove' or equivalent command

2004-07-30 Thread John Baker
Greetings. Does anyone know of a pkg that contains a cvs remove type module? I'm currently using Cvs.pm, it suits my needs, but it doesn't contain functionality to cvs remove a single file. Regards. John -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Re: howto 'cat file|grep "foo bar"|wc -l' in perl

2004-07-30 Thread John W. Krahn
Maurice Lucas wrote: Hello, Hello, I just started using perl and want to rewrite a simple bash script i've been using in the past to perl. I want to cat file|grep "foo bar"|wc -l and tried it the following way which worked for foobar as one word and not as two words. --- #!/usr/bin/perl $logfile =

RE: A simple client/server problem

2004-07-30 Thread NYIMI Jose (BMB)
> -Original Message- > From: Dan Timis [mailto:[EMAIL PROTECTED] > Sent: Friday, July 30, 2004 7:47 AM > To: [EMAIL PROTECTED] > Subject: A simple client/server problem > > > Hi everyone, > > I am very new to Perl. I need two perl scripts, one would run on a > client, the > other woul

RE: A simple client/server problem

2004-07-30 Thread Bob Showalter
Dan Timis wrote: > Hi everyone, > > I am very new to Perl. I need two perl scripts, one would run on a > client, the > other would run on a server. > ... > I think I can also handle most of the client side. What I don't know > how to do > is open a two way connection with the server. Do I do so

Re: print to both STDOUT and a file?

2004-07-30 Thread Jeff 'japhy' Pinyan
On Jul 29, Brian Volk said: >Is there a way to print to both the STDOUT and a physical file. other than If you want to make it transparent, use the IO::Tee module. It's not standard, though. use IO::Tee; my $tee = IO::Tee->new(\*STDOUT, ">> log.txt"); print $tee "some line of text\n"; Se

Re: print to both STDOUT and a file?

2004-07-30 Thread Chris Devers
On Thu, 29 Jul 2004, Brian Volk wrote: Is there a way to print to both the STDOUT and a physical file. other than ./script.pl >>outfile.txt ? Here is what I have now, which works great, but I would like to see the links (about 2,000) scroll. It's a cop-out, but can't you just have two print stat

Re: howto 'cat file|grep "foo bar"|wc -l' in perl

2004-07-30 Thread Maurice Lucas
It is working Thank you, Flemming Greve Skovengaard and Randy W. Sims With kind regards, Met vriendelijke groet, Maurice Lucas TAOS-IT - Original Message - From: "Flemming Greve Skovengaard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Maurice Lucas" <[EMAIL PROTECTED]> Sent: Friday,

Re: howto 'cat file|grep "foo bar"|wc -l' in perl

2004-07-30 Thread Flemming Greve Skovengaard
Maurice Lucas wrote: Hello, I just started using perl and want to rewrite a simple bash script i've been using in the past to perl. I want to cat file|grep "foo bar"|wc -l and tried it the following way which worked for foobar as one word and not as two words. --- #!/usr/bin/perl $logfile = "/var/l

howto 'cat file|grep "foo bar"|wc -l' in perl

2004-07-30 Thread Maurice Lucas
Hello, I just started using perl and want to rewrite a simple bash script i've been using in the past to perl. I want to cat file|grep "foo bar"|wc -l and tried it the following way which worked for foobar as one word and not as two words. --- #!/usr/bin/perl $logfile = "/var/log/logfile"; $grep

print to both STDOUT and a file?

2004-07-30 Thread Brian Volk
Hi All, Is there a way to print to both the STDOUT and a physical file. other than ./script.pl >>outfile.txt ? Here is what I have now, which works great, but I would like to see the links (about 2,000) scroll. this works great, but the links don't scroll open STDOUT, ">>C:/perl/bin/outp