1 |
On 17/5/2011, at 11:43am, Pandu Poluan wrote: |
2 |
> On 2011-05-17, Neil Bothwick <neil@××××××××××.uk> wrote: |
3 |
>> On Tue, 17 May 2011 01:33:39 +0200, Alan McKinnon wrote: |
4 |
>> |
5 |
>>> grep "GET /Tmp/Linux/G" | /var/log/apache2/access_log | grep-v <myip> | |
6 |
>>> \ awk '{print $1}' | sort | uniq | wc |
7 |
>>> |
8 |
>> ... |
9 |
>> awk does pattern matching, o you can ditch the grep stage and use |
10 |
>> |
11 |
>> awk '! /myip/ {print $1}' |
12 |
>> ... |
13 |
> |
14 |
> Meh, me forgetting what an awk snippet do? Never! |
15 |
> |
16 |
> sed ... now that's a wholly different story :-P |
17 |
|
18 |
Not addressed at you, specifically, but it rather seems like sed & awk are much under-appreciated these days. I'd guess that this may be due to the changing nature of *nix users, but they seem to have "gone out of fashion". Aside from sed's simple replace, I have certainly never learned to do anything useful with them. |
19 |
|
20 |
Stroller. |