Learn
sftp> exit
sftp> get remote_file.txt
Fetching /remote_path/remote_file.txt to remote_file.txt
/remote_path/remote_file.txt 100% 25KB 30.0KB/s 00:00
sftp> exit
echo "put local_file.txt" > sftp_batch_file.txt
echo "exit" >> sftp_batch_file.txt
sftp -b sftp_batch_file.txt user@host