Read a text file and ftp files using bash w/out leaving the ftp prompt
I have a script almost working except for 1 thing & was hoping someone here could help.
What I'm trying to do is read a file that has the files that need to be FTP'd using a bash script. I have everything working except the reading of the file. It works outside of the ftp script I've wrote but once I put it in the FTP script it doesn't.
Here's the Script:
echo "Uploaded Files to Server on `date`:">>"$FILE"
diff -e ftplog tempfile >> difffile
echo $HOST $FTPUSER $FTPPASSWORD
ftp -n $HOST <<-EOF
user $FTPUSER $FTPPASSWORD
#Here's where the problem is that I know of
!while read line
c=$(expr $c + 1)
done < difffile
!len=$(expr $c - 1)
!for (( i=0; i<=$len; i++));
I've been playing w/ the exclamation points to see if that could be the problem, but so far no luck.
Any help would be greatly appreciated.