I have read through several threads (which have been helpful) and I'm still getting an error when trying to sftp a file (client wants it to be sftp'ed) Here is the script:#!/bin/bash HOST=XX.XX.XX.XXPORT=XXXXUSER=rootFILE=/tmp/RANDY/usr/bin/expect<<EODspawn sftp -o Port=$PORT $USER@$HOSTexpect sftp>spawn put $FILEinteractEODThe error I am receiving is:spawn sftp -oPort=XXXX root@XX.XX.XX.XXConnecting to XX.XX.XX.XX...sftp> spawn put /tmp/RANDYcouldn't execute put: no such file or directory    while executingspawn put /tmp/RANDYThe file exists and is in the correct directory.
sftp a file using shell script
sftp;expect