test148-aicboss%cat clear_log.sh
#!/bin/bash
#
Lday=`date +"%Y%m%d" -d "-1days"`
grep 'OutOfMemory' *$Lday*|awk '{print$1,$2}' >>aiweb-yy-c1-${Lday}_check.txt
tar zcf aiweb-yy-c1-${Lday}_log.tar.gz*$Lday*
ftp -n<<!
open 10.3.3.117
user crm crm
binary
cd /crm/logs
put aiweb-yy-c1-${Lday}_log.tar.gz
bye
!
find -atime +10 -name "*"-exec rm -f {} \;