statistics specify some columns count

cat access.log | awk '{print $2}' | sort | uniq -c | sort -k1nr | head -10

# -k1 follow the  first column
   nr 
原文地址:https://www.cnblogs.com/allenhaozi/p/5100075.html