#!/bin/bash a=3975 lines=`wc -l /tmp/zabbix_proxy.log | awk ‘{print $1}‘` echo $a:$lines for ((i=$a;i<=$lines;i++)) do n=$[i]p cmd="sed -n $n /tmp/zabbix_proxy.log" echo $i:$n $cmd done
时间: 2024-10-03 23:28:41
#!/bin/bash a=3975 lines=`wc -l /tmp/zabbix_proxy.log | awk ‘{print $1}‘` echo $a:$lines for ((i=$a;i<=$lines;i++)) do n=$[i]p cmd="sed -n $n /tmp/zabbix_proxy.log" echo $i:$n $cmd done