I tried to upload the file to all system in network. hostfile has all system IP. All are active now. I want to put the file in all system's user1 home folder.
In all system the user1 user account has also active. the numeric numbers are line numbers. i run the ftp script from 9 to 17 for a particular system using the another script file. That time FTP uploaded successfully.
problem : when i put the ftp segment inside of the for loop it give the error like
temp: line 19: syntax error: unexpected end of file
loop also fine.. i have doupt in these area. can we put the ftp segement for number of system. is there any fault. Kindly help me
2 echo "Enter the filename which has to be transfered : "
3 read trans_file
6 for i in `cat hostfile`
8 echo $i
9 ftp -in << EOF
10 open $i
11 quote USER $ftp_user
12 quote PASS $ftp_crpt
15 put txt
"15 put txt"
What is 'txt'? In your script you call the file to transfer "trans_file"
To sniff out the syntax error, you need to repost your script with the correct formatting, and no line numbers. Please also use [code] blocks to make it easier to read
Ok Here i have display my correct format script. Always i use correct aligned scripts. When i paste this script , It changed to the normal. Sorry for your inconvenience.
for i in `cat hostfile`
ftp -in << EOF
quote USER $ftp_user
quote PASS $ftp_crpt
## "txt" is a file which i want to put into the another machine.
## "hostfile" has the machine's IP list
Kindly tell me. why FTP session did not work in under for loop.
Here Ftp command also proper and for loop also.
|All times are GMT -5. The time now is 05:58 AM.|