ftp -n "${host}"
user $USER $PASSWORD
binary
cd $remote_dir
mget *.txt
mdelete *.txt
bye
It does not recognizes userid and password. It executes only upto ftp -m "${host}" line. Then i shows the ftp prompt. It is not executing the following line.
I have to run all the above statements as a single script in FTP. Please let me know what i need change to execute as a single script.