ftp issue

view story

http://www.unix.com – Hi again, I'm using the following shell script via cron to upload the daily log files from my shell to the web server so we can view them online. But somehow logs get corrupted and i don't know what's issue. I would really appreciate for your help please. Code: Shell Script: ftp.sh #!/bin/sh HOST='test.com' USER='test' PASSWORD='test1234' LOGS=$HOME/tst/stats DATE=$(date +%y%m%d) cd $LOGS filename=$(ls -t tst.log*|sed q) tar zcvf daily.$DATE-log.tar.gz $filename ftp -n $HOST > /home/user/ftp-hist/ftp.worked 2> /home/user/ftp-hist/ftp.failed <<END_SCRIPT quote USER $USER quo (HowTos)