ab -n 1 -c 1 -p post.txt -T 'application/x-www-form-urlencoded' -H 'User-U:2Lh72GM2UumEAnZzMgGbwg==;User-D:2Lh72GM2UumEAnZzMgGbwg==' 'http://106.38.231.147/partake/incr'
curl -o /dev/null -s -w %{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{speed_download}"\n" "http://www.taobao.com" 0.014::0.015::0.018::0.019::1516256.00
cat admin-live.log | awk -F ',' '$1 >="2017-02-27 16:26:44" && $1 <="2017-02-27 16:42:01" '
start_time='2017-02-27 16:26:44' && end_time='2017-02-27 16:42:01' && idx_1=`cat -n admin-live.log|grep "${start_time}"|awk '{print $1}'` && idx_2=`cat -n admin-live.log|grep "${end_time}"|awk '{print $1}'` && sed -n "${idx_1},${idx_2}p" admin-live.log
grep -l "xxxx" 日誌文件>tmpfile start_time="log裏的開始時間" end_time="log裏結束時間" idx_1=`cat -n tmp|grep "${start_time}"|awk '{print $1}'` idx_2=`cat -n tmp|grep "${end_time}"|awk '{print $1}'` sed -n "${idx_1},${idx_2}p" tmpfile > result more result
awk -F '分隔符' '{if($列號>100){s+=$列號}}END{print s}' 文件名
更多資料細節參考:http://www.runoob.com/linux/linux-comm-awk.htmlhtml