ksh script problem
I am trying to create an script to ftp a file to a server using a guest account with no password. Manually, I would log in as "guest" and when prompted for a password, simply press the enter key. This has been tested and works fine. I have the following script to attempt to automate the process:
###CODE START####
ftp -n 10.1.12.253 << EOF
user guest
cd /sys/BACKUP
bin
put test
quit
EOF
###CODE END####
It works fine except it requires me to press the return key for the password before sending the rest of the lines. In other similar scripts, the blank line after "user guest" prevents the user from having to press the return key after the password prompt.
This code seems to work sometimes but not all the time
Last edited by pldobs; 12-24-2003 at 03:28 PM.
|