Shell script run error ksh: not found

Hi All,

I am trying to run a script to FTP files from one UNIX server to another UNIX server. Actually I can able to FTP file successfully by manually or paste whole script at prompt. But when I am trying to run script it is giving error.

Please let me know the cause.

#!/bin/sh
HOST=164.123.133.11
USER=abc
PASSWD=abc1
cd /app/data/backup
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
bin
cd /app/data
put abc.TXT
quit
END_SCRIPT
exit 0

Take a look at expect

Could you please give the error of your script ?

ksh: not found !?!
There is no ksh in here. You should write complete input/output from your script and the correct code.

In general my guess (I'm guessing from the topic description which should be added to the message body) is that you could have #!/bin/ksh in your script instead of #!/bin/sh, or this can be an issue of some other script - and in the same time you have no such binary in the system.