Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^2: multiple regex logical AND

by bigswifty00000 (Acolyte)
on Dec 12, 2006 at 20:30 UTC ( #589404=note: print w/ replies, xml ) Need Help??

in reply to Re: multiple regex logical AND
in thread multiple regex logical AND

corrected the missing " and tried this (this file has the 2 params set to what I'm searching for)

perl -nle 'print $ARGV if !$seen{$ARGV}++ ;print if /^JRECOV="yes"/&&/^TEOJ="-w"/' ss1lab02


perl -n00 -le 'print $ARGV if !$seen{$ARGV}++ ;print if /^JRECOV="yes"/ms &&/^TEOJ="-w"/ms' ss1lab02

Neither is returning the lines (filename is returned)

Comment on Re^2: multiple regex logical AND
Replies are listed 'Best First'.
Re^3: multiple regex logical AND
by shmem (Canon) on Dec 12, 2006 at 22:26 UTC
    Please see I know what I mean. Why don't you?

    What's your ss1lab02 file like? mine is:

    # sample input file for node 589354 # hope this helps. no=good JRECOV="yes" TEOJ="-w" foo=bar quux=blorfl

    Oneliner, and output:

    bash$ perl -n00 -le 'print $ARGV if !$seen{$ARGV}++ ;print if /JRECOV= +"yes"/ms && /TEOJ="-w"/ms' ss1lab02 ss1lab02 no=good JRECOV="yes" TEOJ="-w"

    Tired of guessing,

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://589404]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2015-11-25 16:47 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (683 votes), past polls