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

Re: whats wrong with this grep?



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.

> grep '../..-..:..:'  oos.txt | cut -d '>' -f 1 |
>  cut -d ' ' -f 2 | cut -d ':' -f 1 | tr -d ' ' | sort |
>  uniq -c | sort -nr > oos.log

Craog


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: