in reply to Re^3: Searching for two lines that begin with the same string
in thread Searching for two lines that begin with the same string

"if-illnevera +nswerquestionsagain-10.133.3.11" - theres no reason to get indignant, it just didnt work for me. I am not calling you out, or anything. you will notice i bumped your rating while you went and stomped down on mine. <sigh> Check this out though...
[tgrossne@sl6archive1:SavvisCustom, 01:26 PM, Mon Dec 18]>cat routes.t +xt | wc 3940 13780 311528 [tgrossne@sl6archive1:SavvisCustom, 01:26 PM, Mon Dec 18]>perl -ne '/^ +(\S+)/;if($S{$1}){print$S{$1}unless$s{$1}++;print}$S{$1 }=$_' routes.txt | wc 3939 13778 311505
Not sure why it does this for me...

Replies are listed 'Best First'.
Re^5: Searching for two lines that begin with the same string
by shmem (Chancellor) on Dec 18, 2006 at 21:06 UTC
    it just didnt work for me.

    Sorry for the rant mode of my previous post, but it just didn't work is just the type of answers that get me tempered. Never mind. I didn't "stomp down on yours" ;-)

    Regarding your word count - what's in 'routes.txt' ? Is this file consistent with your sample? Is the first char really a non-blank? Is the first sequence of non-blanks a CIDR notated IP address?

    --shmem

    _($_=" "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}