FTP script in ksh88

Hi I tried the following code to FTP the files from test server to dev

#!/bin/ksh
DST=/home/files
 cd $DST
ftp -inv 'test_serv101' << EOF
quote USER test
quote PASS test
# File Path on test server
cd /etc/home/Or_Files
ascii
mget curMonth* $DST
quit
EOF

when i try the above code it is successfully loading the required files into specified path
But the issue is i'm getting the followig output for each file.

local: curMonthApr_file3 remote: curMonthApr_file3
187653 bytes received in 0.12 seconds (1457.71 Kbytes/s)
 PORT command successful.
 Opening ASCII mode data connection for curMonthApr_file3 (2923959 bytes).
 Transfer complete.
 

How to avoid the above kind of output when i execute the script .
Thank You

What is the purpose of the script ? for batch? If so redirect the output to /dev/null...

The purpose of the script is to just download files from test server to dev server.

I tried using >/dev/null like below .

ftp -inv 'test_serv101'  >/dev/null

The system got hanged when i used like above

ftp -inv 'test_serv101' << EOF  >/dev/null 

Command not found err

mget curMonth* $DST >/dev/null 

When i used like above , i'm getting output for each and every file in the terminal

Please suggest me .

you are in interactive mode, ftp wants to announce to you since you are looking (STDOUT) what it has done...
To avoid announcements:
You write a script like:

#!/bin/ksh
myftpscript >/dev/null 2>&1

Make it executable and run it, are you happy? but now how do you know if it did anything...
The wise would be to redirect in a log file, so you can go and check...

Hi , Below script can help for the FTP Automation

*****************************************

#! /usr/bin/ksh
HOST=Enter_FTP_Server_IP_Here
USER=Enter_FTP_Server_Username_Here
PASSWD=Enter_FTP_Server_Password_Here
exec 4>&1
ftp -nv >&4 2>&4 |&
print -p open $HOST
print -p user $USER $PASSWD
#print -p cd directory
print -p binary
print -p ls 
print -p bye
wait
exit 0

****************************************

Regards,
Goksel Yangin
Computer Engineer

---------- Post updated at 07:28 AM ---------- Previous update was at 07:24 AM ----------

This can help for telnet automation

#! /usr/bin/ksh
HOST=$1
USER=Enter_Username_Here
PASSWD=Enter_Password_Here

exec 4>&1
telnet  >&4 2>&4 |&

print -p open $HOST
sleep 3
print -p $USER
sleep 3
print -p $PASSWD
sleep 3

print -p "show sntp"
print -p logout

wait
exit 0

Assume that script name is gokcell, and you have some remote Device, It can be Cisco Aggregator or Router,Juniper, Alcatel Dslam,FTTX,or Huawei or any kinf of Transmission device. Then it will automatically login.
Usage: ./gokcell 10.10.10.10

Regards,
Goksel Yangin
Computer Engineer