|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Script to open a FTP-connection
Hi,
I developed the below script to open a ftp connection an transfer files: Code:
#!/bin/sh files=`find *.tar.gz | xargs` for FILE in $files; do ### Begin of FTP embeded echo FILE log file> $FILE.log echo Begin conection at: >> $FILE.log date >> $FILE.log ftp -i <<** bin mput $FILE.tar.gz bye ** echo End conection at: >> $FILE.log date >> $FILE.log ### End of FTP embeded echo ftp of $FILE transfer ended. done But when this script I am getting this error: Code:
Syntax error at line 11 : `<<' is not matched I am using this "<<" like this Code:
ftp -i <<** Could you please give an advise? Cheers, mona |
|
#2
|
|||
|
|||
|
1. Never use "*" or "?" in identifier names. They expand to file names. Best stick to names with a-z,0-9 only.
2. The identifier you choose to end the "here" definition (you used "**") has to be the sole entry in that line, no leading (no trailing either) whitespace allowed. hth, ...M
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > Script to open a FTP-connection |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|