I am trying to ftp multiple files from one machine to another using shell script. Below is my script :-
ftp -nv <<EOF
open home.machine.com
user remote monday
binary
mput *.txt
bye
<<EOF
now, the problem is, it hangs in between, but when i try each and every command on the command prompt. after i execute mput *.txt
it asks for confirmation for each and every file, when i enter yes
then it moves on to next file, and asks again.
Am i missing something?
Thanks.
From the manual:
i tried something like this
prompt
command closed the user interaction, and then it workedd properly.Based on your code snippet, it should be like this:
notice the inclusion of '-i' in the ftp arguments.
also, it is not advisable to use mput since it will be difficult to track errors than transferring files individually