Trouble when automating ftp with shell script
Hi,
I wrote a small shell script to automate ftp, something like this
ftp -n <host ip> <<END_SCRIPT
user <user name> <password>
<some ops>
bye
END_SCRIPT
This works fine. But if i give the token "END_SCRIPT" with some indentation like i've given below shell isn't recognizing it????
<some stuff>
if [ 0 = 0 ]
then
ftp -n <host ip> <<END_SCRIPT
user <user name> <password>
<some ops>
bye
END_SCRIPT
fi
<some stuff>
Can anyone tell me why this is happening??????
Thanks,
Hari.
|