Print field x in a space separated gzipped logfile

In the below case x is 2 (numbering starts from zero).

gunzip -c access.log.1.gz | perl -ne '@a=split / +/, $_; print $a[2]."\n"'

Popularity: 1% [?]

Tags: , ,

Leave a Reply