软讯网络 > 操作系统 > Linux > 我寫的一個記錄垃圾郵件的腳本.不是很完善
【标 题】:我寫的一個記錄垃圾郵件的腳本.不是很完善
【关键字】:
【来 源】:http://www.cublog.cn/u/5591/showart.php?id=144130
我寫的一個記錄垃圾郵件的腳本.不是很完善
#!/bin/sh
file=/home/www/syslog.txt
echo -e "\n" > $file
echo -e "\n" "write by snowtty the log create time is at: `date +%Y-%m-%d" "%T`" >> $file
echo -e "\n\n" >> $file
cur=/opt/messagesoft/smg/data/log
year=`date +%Y`
month=`date +%m`
day=`date +%d`
dir=$cur/$year/$month/$day/MTADELIVERY
cat $dir/* |egrep "spam-hits"|sort +4|awk '{printf("%-4s\b\b%s\b\b%-42s\t%-35s\t%s\b%s\n" ,NR,$2,$4,$5,$15,$NF)}' \
>> $file
echo -e "\n" >> $file
echo Create end at `date +%Y-%m-%d" "%T` >> $file
【相关文章】
没有相关文章