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
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...
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