[Techtalk] Shell script problem

Lucky Lady needlesschatter at yahoo.com
Thu Jul 14 05:58:19 EST 2005


Hi,

I wrote the follwing script to zip the contents of my
acct directory and put the zip in my data directory.
However, when the script runs the following message
appears: "zip warning: /home/acct.zip not found or
empty". What am I doing wrong? My script:

#!/bin/sh
#
#
DATADIR="/home/acct"
BACKUPFILE=$1
BACKUPPATH="/home/daly/bkup/data";
#
echo Backup Date: $(date) >
$BACKUPPATH/$BACKUPFILE.log
echo Backup Target: $DATADIR >>
$BACKUPPATH/$BACKUPFILE.log
#
if (ls $DATADIR) then
    echo "Backing up " $DATADIR;
    cd $BACKUPPATH;
    zip -ruv $BACKUPFILE $DATADIR >>
$BACKUPPATH/$BACKUPFILE.log
fi;

---------

Thanks,

DaLy


		
__________________________________ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 



More information about the Techtalk mailing list