shell 实例。。。ing

jiqi=(0102030405060708091011121314)

for((d=4;d<11;d++))

do

year=`date--date="$ddayago"+%Y`

month=`date--date="$ddaysago"+%m`

day=`date--date="$ddaysago"+%d`

for((i=0;i<14;i++))

do

if[${jiqi[${i}]}-ne'01']&&[${jiqi[${i}]}-ne'03']

then

lzop-dcf$year$month/$year$month$day/input_shouji_access_log.$year$month${day}22.resin${jiqi[${i}]}*|head-n7000|awk'{print$4}'|sort|uniq-c|sort-nr>>/search/odin/resin/WebContent/shellscript/jiankong/$year$month$day.log

fi

done

done

-------------------------------------------

相关推荐