Hi All,
Hope you all had a great weekend.
I have a file:
Text.txt
One
Match Not
Two
Match
Three
Four
---
Now I want to get only the line that has Match and not the line Match
Not.
I used :
cat text.txt | perl -nle 'print $_ if (/Match/)(!/Match Not/)'
Now I want to get only the line that has Match and not the line Match
Not.
I used :
cat text.txt | perl -nle 'print $_ if (/Match/)(!/Match Not/)'
But I want to do that inside one regular expression.
Hello,
perl -nle 'print $_ if /Match(?!\s+Not)/'
--
Chinese Practical Mod_perl book
Hi!
I'm wondering if you could point me to some easy step-by-step tutorial for
the following problem (i got tons of tuts on google, none of them really
helped me)
Backgroung: I've written a pseudo-filesystem in C for my game
(BlinkenSisters). As the planned level editor is going to be Perl/TK, i
Sarthak Patnaik wrote:
I have a file:
Text.txt
One
Match Not
Two
Match
Three
Four
---
Now I want to get only the line that has Match and not the line Match
Not.
I used :
cat text.txt | perl -nle 'print $_ if (/Match/)(!/Match Not/)'
But I want to do that inside one regular
Morning all,
I am working on a script that reads in /var/log/auth.log,, takes the ip
addresses puts them into a hash keeping track of how many times it finds
that address and compare it to addresses found in /etc/hosts.deny and
only write the addresses that are new in the file. So far I can get
On 5/7/07, Tim Wolak [EMAIL PROTECTED] wrote:
however I am struggling on how to compare the hash with an array for any
duplicate addresses. What is the best approach to take with this?
You want to know whether a given IP address matches any of a list of
IP addresses, right? Probably I'd use
Hi,
When I'm developing web applications I have a dev version of the
scripts, modules and database and a live version. Nothing new there.
I'm trying to automate the process of moving the dev site to the live
site (the dev sites are on a Fedora server on my desk and the live sites
on a
On Mon, May 07, 2007 at 05:13:12PM +0100, Nigel Peck wrote:
I'd like to find a way of comparing the two MySQL database
strcutures and getting a list of the differences, anyone know of any
modules/methods for doing this?
I don't know about something Perl-specific, but I guess what you want is
Hi Jen,
Thanks for your suggestion, I don't have a master build script, I do it
be hand through phpMyAdmin and then use the backup feature of that if I
want to move it.
I'm really looking for something that I can say to: compare this
database with this one and tell me what the differences
Tim Wolak wrote:
Morning all,
Hello,
I am working on a script that reads in /var/log/auth.log,, takes the ip
addresses puts them into a hash keeping track of how many times it finds
that address and compare it to addresses found in /etc/hosts.deny and
only write the addresses that are new
Hi!
I'd like to find a way of comparing the two MySQL database strcutures
and getting a list of the differences, anyone know of any
modules/methods for doing this?
Here's more or less what some commercial tools do:
**pseudocode start**
get all lines, split them into a datastructure like
Morning all,
I am working on a script that reads in /var/log/auth.log,, takes the ip
addresses puts them into a hash keeping track of how many times it finds
that address and compare it to addresses found in /etc/hosts.deny and
only write the addresses that are new in the file. So far I
I have one file that contains a log. I do a substr to get the
information out of that and push it into an array.
I have a second file that contain another log. I need to loop through
the items in the array and find them in this log. Once I find the line
that the id is on, I need the next line
I have this script I have been working on where I need to redirect STDOUT
and STDERR to files at the beginning of the script and then back to default
(terminal) at the end of the script. I found an example on-line and used it
and it works, however it generates a warning when running my script. I
On 5/7/07, Karyn Williams [EMAIL PROTECTED] wrote:
I have this script I have been working on where I need to redirect STDOUT
and STDERR to files at the beginning of the script and then back to default
(terminal) at the end of the script. I found an example on-line and used it
and it works,
On 5/7/07, Karyn Williams [EMAIL PROTECTED] wrote:
I have this script I have been working on where I need to redirect STDOUT
and STDERR to files at the beginning of the script and then back to default
(terminal) at the end of the script. I found an example on-line and used it
and it works,
This may work for you:
http://www.adamspiers.org/computing/mysqldiff/
http://search.cpan.org/~aspiers/MySQL-Diff-0.33/
I tried it comparing 2 test databases here and it appears to work.
On 5/7/07, Nigel Peck [EMAIL PROTECTED] wrote:
Hi,
When I'm developing web applications I have a dev
On 5/7/07, Robert Hicks [EMAIL PROTECTED] wrote:
I have one file that contains a log. I do a substr to get the
information out of that and push it into an array.
I have a second file that contain another log. I need to loop through
the items in the array and find them in this log. Once I find
Does any one have suggestions how to model - give the end user - views
of the windows and navigation of a Perl Tk application?
John W Moon
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/
Hi All,
I am having big problems solving this sorting issue and would really
appreciate any help on this.
I have a list with each row containing 3 numbers(Run In Out).
For example,
R01 13 19
R01 25 30
R01 23 47
R01 2 14
R02 2 45
R02 55 60
R01 1 17
R03 45 66
R03 20 35
and so on..
I would
Chas Owens wrote:
On 5/7/07, Robert Hicks [EMAIL PROTECTED] wrote:
I have one file that contains a log. I do a substr to get the
information out of that and push it into an array.
I have a second file that contain another log. I need to loop through
the items in the array and find them in this
On 5/7/07, Nisse Tuta [EMAIL PROTECTED] wrote:
I would like to go through these and check for any overlapping numbers
at both In and Out and replacing either the in out or both if
overlapped. And any cuts/breaks in each run will add a count.
I'd like more information on what you're trying to
I don't understand what you want to do with duplicates. The example
input and output don't seem to match.
You likely want to use a hash.
You can do something like this (untested code):
my %hash;
foreach (@array) {
my ($run, $in, $out) = split / /; # Split the array element by spaces
# Count
David Van Ginneken wrote:
This may work for you:
http://www.adamspiers.org/computing/mysqldiff/
http://search.cpan.org/~aspiers/MySQL-Diff-0.33/
http://search.cpan.org/~aspiers/MySQL-Diff-0.33/
I tried it comparing 2 test databases here and it appears to work.
Looks like exactly what I'm
On 5/7/07, Robert Hicks [EMAIL PROTECTED] wrote:
snip
I think part of the problem is the 'shift'ing that I was doing. I am
looking into that. Basically I was shift'ing the @log out of existence
after the first pass.
snip
That sounds like a viable candidate for the warning as well.
snip
Karyn Williams wrote:
I have this script I have been working on where I need to redirect STDOUT
and STDERR to files at the beginning of the script and then back to default
(terminal) at the end of the script. I found an example on-line and used it
and it works, however it generates a warning
Chas Owens wrote:
On 5/7/07, Robert Hicks [EMAIL PROTECTED] wrote:
snip
I think part of the problem is the 'shift'ing that I was doing. I am
looking into that. Basically I was shift'ing the @log out of existence
after the first pass.
snip
That sounds like a viable candidate for the warning as
27 matches
Mail list logo