http://www.perlmonks.org?node_id=440361


in reply to Re: [off-site] Bash + Perl oneliners basics
in thread [off-site] Bash + Perl oneliners basics

TBH I'd lose the Perl altogether:

awk '{ file[$7]++ } END { for ( v in file ) print file[v], v }' /var/ +log/httpd/access_log | sort -n | tail +10
I'm sure you could lose the rest of the pipe too but I never got my head around AWK's asort() for cases like this.

/J\