|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
FTP in a for or a while loop
Hi
I have a file abc.txt which has certain filenames abc.txt 1.txt 2.txt These files 1.txt and 2.txt are present in the same directory as abc.txt I want to ftp these files 1.txt and 2.txt reading abc.txt I have written a script with the following command. cat abc.txt | while read fname do ftp -in << EOF > $LOG_FILE verbose open ${SERVER} $LOGON binary cd $REMOTE_FILE_PATH put $fname close bye done However i am getting an error as Syntax error at line 50 : `do' is not matched. What could be the reason? Are there any other ways to acheive the same results what i am trying to do. Thanks much in advance |
|
#2
|
||||
|
||||
|
Not sure if it will fix it, but you seem to have mislaid the line that says EOF (which will terminate your input)
__________________
According to Sod's Law, buttered toast lands butter side down, when dropped. Per nature, cats always land on their feet. So, what happens when you strap buttered toast to the back of a cat and throw it out a window?. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > FTP in a for or a while loop |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|