統計分析文中的log文件的每一個IP的訪問量並由高到低排序bash
把文件下載到本地改後綴ide
#!/bin/bash awk '{print $1}' ip.log | sort | uniq -c | sort -rn | more
sh -x uniqip.sh 排序
+ awk '{print $1}' ip.logip
+ sortit
+ uniq -cclass
+ sort -rnawk
+ more下載
19 59.58.137.166im
17 64.31.32.131統計
16 210.72.154.243
12 36.249.165.107
12 27.184.41.29
10 120.42.87.69
10 112.111.188.62
9 58.246.163.139
8 124.127.244.1