Problem with SFTP script

Hi All,

I can log in properly with my sftp handshake with the script, but can not get it to execute the lines of code for get commands within the script. Is there anything special with SFTP we need to do to make this work. I have went and looked on the message board but did not find anything quite specific to this.

Here is all I am trying to do(login id x'ed & addr changed )

sftp xxxxx@123.45.67.89
   ascii
   get rec1.dat
   get sfsum.dat
   quit

It recognizes nothing after the sftp xxx.123.45.67.89.

Any ideas would be appreciated!

Bill

sftp xxxxx@123.45.67.89 << EOF
   ascii
   get rec1.dat
   get sfsum.dat
   quit
EOF

You must use a "here script" in your script sh...

ftp -n  << EOF
open  "your ip"
quote user "your user" 
quote pass "your pass"
ascii
get your file
bye
EOF

scottn,

Your way worked. Thanks! Was able to go out and pull in the files I needed. Just needed to terminate the lines so It knew to read next.
Again........many THANKS!!!