Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP Log File Question

Status
Not open for further replies.
May 23, 2002
8
0
0
US
I'm trying to get a logfile created of my FTP when it runs in my script so that I can validate the transfer each day. The problem is that the file is created, but nothing is in it and I know my FTP is working. So why no data in my log file ? Here is the code, any help is appreciated....


!/bin/sh
if [ "`cat $OUTF | wc -l`" -gt 0 ]; then
### FTP of File
ftp -n $FTP_HOST<<END_SCRIPT>>$OUTLOG
quote USER $FTP_USER
quote PASS $FTP_PASSWD
ascii
quote site SID=$SENDER,FNM=$FILENAME,BLKSIZE=93,LRECL=93
put $OUTFTP /$SENDER/$RECEIVER/$MAILBOX/$OUTFTP
quit
END_SCRIPT
fi
 
Do you have variables setup for $OUTLOG ? you don't show that if so do you have write access to it?
 
Yes, I have the variable set, and I have read/write access ? Could it be that I need the -i option set when I FTP ? I just use the -n , any ideas is appreciated ....
 
Try
ftp -n $FTP_HOST >> $OUTLOG <<END_SCRIPT

That's how I have mine set up. You may want to try -inv also.

Hope that helps.

 
Use -v option to get all output in a log file:

ftp -v -n $FTP_HOST <<END_SCRIPT >>$OUTLOG

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top