: MIDRANGE dot COM Mailing List Archive

Re: using expect script to do sftp


AddThis Feed Button


Hello,

A tar file is an archive file. It's like a SAVF. Or a ZIP file. That sort of thing. You can't *run* a tar file.

You need to unpack/install the contents of the TAR file. i.e. restore the contents of the archive. Then, you can run the stuff that was inside it.


hockchai Lim wrote:
I'm having some problem executing a shell script that uses Expect script to do sftp by user ID and password and hope that someone here can help me with it. When I execute the script I get the following error:
/home/palhc/sftp819.sh: /home/palhc/expectScript/expect.5.43.tar: 0403-006 Execute permission denied.


Here is what I did:
1) Installed the OpenSSH.
2) Download Expect tool from http://www.scottklement.com/expect/ and uncompress.
3) Create a script that looks like this: http://code.midrange.com/d585dbe59e.html
4) My CL to execute the script looks like this: http://code.midrange.com/78ef308dcc.html

thanks









Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2010 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact