awk 取列后对数值进行判断取出大于1的数值

[root@dataline-prod nginx]# tail -2 access.log
122.238.119.177 - - [26/Oct/2018:18:20:25 +0800] "GET /api//shop/follow_cancel?shopId=124732134 HTTP/1.1" 200 41 "https://bi.deepfashion.cn/page/dataline/shopwatch" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" "-" "0.008"
122.238.119.177 - - [26/Oct/2018:18:20:26 +0800] "GET /api/daily/follow-shop-list?watchStatus=1&shopFilterStatus=2&firstCategoryName=&secondCategoryName=&shopType=&dateRangeStatus=3&averagePrice=&shopStyle=&shopName=&business=%E5%A5%B3%E8%A3%85&rankStatus=2&startDate=2018-10-25&endDate=2018-10-25&pageNo=3&pageSize=20 HTTP/1.1" 200 28940 "https://bi.deepfashion.cn/page/dataline/shopwatch" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36" "-" "0.245"

  nginx 日志中最后一列输出的 request-time 时间, 需取出时间大于 1秒的 数值。 

 

[root@dataline-prod nginx]# tail -100 access.log |awk '{print $NF}'|awk -F '"' ' $2>1 '|awk -F '"' '{print $2}'
1.581

  

你可能感兴趣的:(awk 取列后对数值进行判断取出大于1的数值)