#!/bin/sh USE_INTERNET=true if $USE_INTERNET ; then Pwd=`pwd` cd /export/home/office-bin/virus/data echo -e "cd /pub/antivirus/datfiles/3.x/\nget -C *.zip\nexit\n" | \ ncftp ftp.mcafee.com >/dev/null 2>&1 set -- `ls -t *.zip` if [ $# -gt 1 ] ; then cnt=0 for f in $* ; do if [ $cnt -eq 0 ] ; then unzip -jLo $f \*.dat cnt=1 else rm -f $f fi done fi cd $Pwd fi /export/home/office-bin/virus/uvscan -d /export/home/office-bin/virus/data -r -m /export/home/office-bin/virus/bad -f /export/home/office-bin/virus/scan.list >/tmp/virscan.$$ 2>&1 cat /export/home/office-bin/virus/ToAdmin /tmp/virscan.$$ | sendmail -t cat /tmp/virscan.$$ | grep '^File' | \ sed -e 's/\/export\/home\/office\//J:\//' | \ sed -e 's/\/export\/home\/\([a-z][a-z]*\)\/\(.*\)/\1 I:\/\2/' >/tmp/mail_ncc.$$ rm -f /tmp/virscan.$$ if [ -s /tmp/mail_office.$$ ] ; then cat /export/home/office-bin/virus/ToOffice /tmp/mail_office.$$ | sendmail -t fi rm -f /tmp/mail_office.$$