sftp problem

I have written a samll sftp script abc.sh as below

sftp user@remote-server <<EOF
lcd /home/gopi
cd /home/raju
get COA
exit
EOF

Its working. But when i rin the script, it gives the acknowledgement like ,

sftp> lcd /home/gopi
sftp> cd /home/raju
sftp> get COA
Fetching /home/ndw/COA to COA 100% 5 0.2KB/s 00:02
sftp> exit

But i dont need these acknowledgement. But i need only incase of error. Is there any option to compress all these acknowledgement.?

try the batch mode option -b.

Thank You dear. is any other option than Batch mode (-b) ?

Hey Gopal,

If you have these commands into script called sftp.txt & you don't want anything to print on screen, you can redirect standard output file descriptor (1) to /dev.null.

ksh sftp.txt > /dev/null 1

-Nithin.