[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: whats wrong with this grep?



on Sun, Jun 16, 2002, Craig Dickson (crdic@pacbell.net) wrote:
> begin  Tim locke  quotation:
> 
> > Craig, Sorry about not being clear on my question.
> > It's because I'm having a hard time analysing large
> > amount of traffic logs and the fact that I'm not an
> > expert at scripting and what I was looking for was a
> > quick way to get the number of src ips.
> 
> Okay, but what does the input file (oos.txt) look like? I don't see how
> your script would apply to an apache access log, so I'm guessing this
> is some other program's log, but which one? If you still need help with
> this, please post a line or two of text that you expect to match the
> initial grep, and perhaps a line or two from the same file that should
> _not_ match the grep, and we'll see if your script ought to work, or if
> there might be a simpler way to do it.

Also, generally, it's easier to debug a script by breaking it into
component pieces.  See if the 'grep' is returning what you want.  Check
that your 'cut' is splitting the results properly.  That your sort
works.  Etc.  Divide and conquor.

If you're posting to list, sample data and intended results are also
necessary.

Peace.

-- 
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
   A guide to GNU/Linux books:
     http://kmself.home.netcom.com/Linux/FAQs/linux-books.html

Attachment: pgpLyqnFX67JO.pgp
Description: PGP signature


Reply to: