RE: perl script instead of grep

2007-01-08 Thread andreas . moroder
Quoting Roman <[EMAIL PROTECTED]>: Hope fully this helps ### Script start use strict; my $process_dir = 'C:\work\_RHWork\projects\perl-beginers\directory-read\files-dir'; opendir(DIR,$process_dir) or die "Can't open dir: $! \n"; my @files = readdir(DIR) or die "Can't read dir: $! \n"; c

RE: perl script instead of grep

2007-01-08 Thread andreas . moroder
Hope fully this helps ### Script start use strict; ... Hello, problem solved. The script was writeen for windows with \\ in the path. It should run on a linux box. I replaced the \\ with // and now it works. Is ti possible, for compatibility, to use // in windows too ? Thanks Andreas

RE: perl script instead of grep

2007-01-08 Thread Ken Foskey
l Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, 8 January 2007 5:16 PM > To: Roman > Cc: beginners@perl.org > Subject: RE: perl script instead of grep > > > > > Hope fully this helps > > > > ### Script start > >

RE: perl script instead of grep

2007-01-08 Thread Roman
hould be able to run it on windows and linux.. Most of my development it on windows. So I don't think too much about unix compability. Cheers Roman -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, 8 January 2007 5:16 PM To: Roman Cc: beginners@pe

Re: perl script instead of grep

2007-01-07 Thread Andreas Moroder
Based on your specs this should work: perl -lne'print $ARGV =~ /^PC=([^,]+)/, " $1" if /^Mac-Adresse:\s*([[:xdigit:]:]+)/' PC* John Hello John, no, it doesn't It returns two times the name of the pc. Bye Andreas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: perl script instead of grep

2007-01-05 Thread John W. Krahn
Andreas Moroder wrote: > Hello, Hello, > I have a directory with many files with names made like this two: > > PC=laptop-fortbild,USER=fsigmund,OS=95-98 > PC=INFO-FABIAN,USER=fsigmund,OS=W2K-XP > > This text files may contain a line like this one > > Mac-Adresse: 00:10:D7:09:5E:16 > > With gr

RE: perl script instead of grep

2007-01-05 Thread Roman
-Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Moroder Sent: Friday, 5 January 2007 8:37 PM To: beginners@perl.org Subject: perl script instead of grep Hello, I have a directory with many files with names made like this two: PC=laptop-fortbild,USER=fsigmun