1

I have following :

$ cat upload.sh
sshpass -f ~/path_to_password/pass.txt sftp user@remote.location.net:/pools/path/ << EOF
put backup.tar
EOF

When i execute the upload.sh it shows nothing (file is not uploaded) and does not exit auto. How to properly exit and make sure the upload is made?

  • 1
    take a look at [sexpect](https://github.com/clarkwang/sexpect) which you can use to write Expect like scripts with shell only. – pynexj May 09 '18 at 15:06

0 Answers0