| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Comments:
<0> I will defend the existence of Presidents because, if it comes to war, having a singular leader is saner. <1> it didn't work then, it's not working now. <2> jsn: That's what you pay generals for. <1> it's not saner, it's not saner at all <2> The president has not been through proper officer training for a start. <0> You mean the generals have ultimate charge of the war effort? yikes <1> http://www.google.com/url?sa=U&start=1&q=http://en.wikipedia.org/wiki/Hitler&e=9797 <3> bluebeard's url is at http://xrl.us/mmzg <0> I guess this convo is over. ;) <1> haha <1> yea <1> take THAT <1> the first time anyone mentions nazis, the conversation dies. <1> unless it's a deliberate attempt to end the conversation. <2> Except when you're *deliberately* trying to invoke godwin. <4> we muse die jude exclude
<5> -_____- <2> At least I was trying to be subtle by comparing bush to chirac to saddam :-P <0> Hey, Bush and Saddam had the same Italian shoemaker. <0> Must be the shoes. <6> damn eye-talians <0> What's on Radio4, for all us non-brits? <6> POOORN <7> integral: what is the best way when going through line by line, should I check each word or just use your cryptic method? :) <5> lol <7> integral: I want to push each of the from= email addresses into an array <2> jsn: drama, news, current affairs, porn for the anti-government liberal etc <7> integral: in bash I would wc each line for the # of words and awk '{print $X}' each word and then see if it is what I want and then put it into a text file <1> lol <2> war92: o_O that seems very bad for bah. <2> *bash <2> while (<>) { print $1 if /from=(\S+)/; } <0> We don't have porn for the anti-government liberal here. At best there is this one guy who made a bra out of some paper and thread and holds it up and cheers what a player he is <0> while (<>) { :) } <5> jsn: sorry to hear that <7> integral: nice concept but doesnt work because I don't know what I am doing, back to google <2> google? perl comes with a manual. <0> man perl <0> :) <2> good night all <0> ciao <5> while(<('-_-)>) { (>^_(>x_x)> } <0> Well, there is a blog I like, WhateverItIsImAgainstIt.blogspot.com :) <5> I like the 3 stages of listening to bush <2> .oO( "Lordi ... are not a gospel band either." ) <1> perldoc <1> wtf <1> er <1> ftw <7> if($line =~ m/from=/ && $line =~ m/to=/ && $line !~ m/(postfix\/(qmgr|smptd|pickup))/) <- that works, but basically I need to populate two arrays, the from= and to= and I have a hard time figuring out what can -extract- the data from the line? a chop? <0> try perldoc chop <7> k <0> perldoc -f chop <8> chop. To access this perldoc please type, at a command line, 'perldoc -f chop'. You may also find it at http://perldoc.perl.org/functions/chop.html <0> sorry <9> you don't use chop to extract anything <5> Anyone know how to get the value of the Time::TimeTick ticker without reseting or printing? <7> indeed, it only chops off the last char of a string <5> chomp > chop <7> then in perldoc it says to use an @array = split(.. <7> will try that <7> so chomp($line) -> then my $array = split(/from=/); <7> then print "@array\n"; <7> says an bad use of unitialized value in split, hrmm <9> devonst17: the module's entire purpose seems to be for printing so trying to prevent it from printing seems a bit sily <0> bad troll <5> Khisanth: you can supress the printing, and this might not be the right module to use, <5> Khisanth: im trying to write a game timer so i can say if 10 seconds have p***ed <0> One can always suppress printing by redirecting STDERR and STDOUT to /dev/null <5> and stuff <0> Unless your /dev/null is full... <5> Right, but that doesnt give me a value of the current timer <0> Time::HiRes is all you need, guy. <5> Thanks <9> depends on the context
<5> bbl <0> I think I need to switch to gimp <0> bbl <7> @array = split(/from=/, $line); <7> but when I print @array, it prints the entire line, not just the from= part <10> sure <10> that's expected <10> are you using split when you should just be using a regex? <7> merlyn: one can use either right? <7> merlyn: I just want the email address from the from= field <10> what's a "from=" field? <7> from=<blmorganjjjgs@bargains2turkey.com> <10> is that on a line by itself? <7> its part of a longer line <10> what delimits it from the next field? <7> a space <10> my ($from) = $line =~ /from=(\S+)/; <10> that'll break if there's other appearances of from= <6> there's not. postfix has a non-****y logfile format. <6> unlike exim <7> why does $from have tobe in () <7> when its not, it just prints 1 <10> perldoc perlre <8> perlre - Perl regular expressions, the rest of the story. To access this perldoc please type, at a command line, 'perldoc perlre'. You may also find it at http://perldoc.perl.org/perlre.html <6> list context. <7> ok, so whenever I want to extract something, I use my ($var) = $line =~ /what_i_am_grepping_for=(\S+)/g; <7> my ($from) = $line =~ m/from=(\S+)/g; <7> works nicely.. <7> then I need to remove the < and > from the lines <7> checking google again <9> tr/<>//d <0> bah, gimp is quiet <0> plus, their PDB is good enough that I could figure out what I need (if not how to use it <7> http://www.internetz.com/programming/perl/functions.html <7> $from = tr/<>//; <7> just need to figure out the syntax I guess <7> brb <11> hi <6> why bother? <0> plug_in_zealouscrop seems to have cropped the whole layer <6> you're using a regex anyway <6> m/from=<(\S+)>/g <7> $from =~ tr/<>//; <7> so the \S+ (data to be extracted) is the gold and you just put a regex around it to scoop out what you want <12> what does your sample line look like and what are you trying to return from it? <6> yes .. <6> that's generally what regexes are used for <13> BOTJE <11> hm, quick question... I've got an array... and I can use something like this: if (/upgraded:/ .. /upgraded,/) { to fetch the right lines, including the ones containing "upgraded:" but I want only the lines between those. I'm sure there is a quick way to match them, but I haven't found it yet... anybody has an idea? <6> BUU <13> t0mas: Yes. <0> sounds like a job for grep <0> t0mas, <13> jsn: Not really.. <13> It sounds like a job for the flip flop operator. <7> example line? Jan 12 15:45:31 box postfix/smtpd[10678]: NOQUEUE: reject: RCPT from cpe-24-195-114-156.nycap.res.rr.com[24.195.114.156]: 504 <localhost>: Helo command rejected: need fully-qualified hostname; from=<robert@yahoo.com> to=<3d947a3e.4d1c4678@domain.com> proto=SMTP helo=<localhost> <13> Well, actually, I suppose you could grep and flipflop <13> grep /start/ .. /stop/, @ar <11> no, not really... I'm doing a perl script... feels stupid to call grep to do it for me? <7> Botje: very nice. <13> t0mas: Grep is a perl function. <11> aaaah ok <11> didn't know that <14> war92: nobody else has written a postfix log processor before? <7> thrig: Jim Seymour has, pflogsumm.pl <13> eval: @x=qw/foo bar start 1 2 3 4 stop 9 0 8/; [grep /start/ .. /stop/, @x] <8> buu: Return: ['start','1','2','3','4','stop'] <11> can grep /start/ ... /stop/, @arr also use $something instead of #arr ? <13> eval: @x=qw/foo bar start 1 2 3 4 stop 9 0 8/; [grep /start/ ... /stop/, @x] <8> buu: Return: ['start','1','2','3','4','stop'] <13> Well, more or less <7> thrig: but when you copy other peoples 'code then its just yet another log parser, no? <13> t0mas: Um. No. That makes no sens.e <15> buuu!!!
Return to
#perl or Go to some related
logs:
#gentoo distccmon-text screenshot #math #css #mysql TranceRiver #mysql openmotif fail emerge suse 9.3 nvidia XF86DGANoDirectVideoMode #perl
|
|