You need some minor changes.
1 Call sftp with the site and user as command line options:
Code:
sftp -b batch_file $SAP_UP_USER@$SAP_UP_SERVER
You can set up a passwordless connection, or enter it at the password prompt.
There is no ascii/binary command.
There is no prompt command
batch_file contains
Code:
put local_file_name remote_file_name
quit
I have never tried:
Code:
sftp -b - $user@$site <<FIN
put file
quit
FIN