I have Apache
logfile, access.log
, how to count number of line occurrence in that file? for example the result of cut -f 7 -d ' ' | cut -d '?' -f 1 | tr '[:upper:]' '[:lower:]'
is
a.php
b.php
a.php
c.php
d.php
b.php
a.php
the result that I want is:
3 a.php
2 b.php
1 d.php # order doesn't matter
1 c.php
| sort | uniq -c
– Costas Nov 26 '14 at 11:33| LC_ALL=C sort | LC_ALL=C uniq -c
– Stéphane Chazelas Nov 26 '14 at 11:33uniq
could do that.. – Kokizzu Nov 26 '14 at 11:37