点击日志统计
for d in {17..26}; do echo -n "$d " a1=`grep 423770_201910$d ./counter.log-2019-10-$d* |wc -l ` a2=`grep 418805_201910$d ./counter.log-2019-10-$d* |wc -l` echo -n "$a1 $a2 " echo " " done for d in {17..26}; do echo -n "$d " ; awk -F" " '{if($32==423770){a++} else if($32==418805){b++} }END{print a , b } ' click.log-2019-10-$d* echo " " done cat click.log-2019-10-17* |awk -F" " '{ print $32 } ' awk -F" " '{if($32==423770){a++} else if($32==418805){b++} }END{print a , b } ' click.log-2019-10-18*