1 |
On Tue, May 17, 2011 at 01:33:39AM +0200, Alan McKinnon wrote: |
2 |
> grep "GET /Tmp/Linux/G" | /var/log/apache2/access_log | grep-v <myip> | \ |
3 |
> awk '{print $1}' | sort | uniq | wc |
4 |
> |
5 |
> In true grand Unix tradition you cannot get quicker, dirtier or more effective |
6 |
> than that |
7 |
> |
8 |
|
9 |
You can replace "sort | uniq" by "sort -u" |
10 |
|
11 |
And the "Grand Unix Tradition" probably would 'cut' instead of awk :) |
12 |
|
13 |
While you are at it, an incantation that pipes grep to awk? Seriously? |
14 |
|
15 |
W |
16 |
-- |
17 |
Willie W. Wong wwong@××××××××××××××.edu |
18 |
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire |
19 |
et vice versa ~~~ I. Newton |