![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sftp script in .sh | koti_rama | UNIX for Dummies Questions & Answers | 2 | 08-22-2007 08:01 AM |
| sftp script | coburn | Shell Programming and Scripting | 2 | 10-14-2006 02:06 PM |
| SFTP script | HROMERO | UNIX for Dummies Questions & Answers | 0 | 10-19-2005 05:50 PM |
| sftp through script | RishiPahuja | Shell Programming and Scripting | 1 | 04-21-2005 01:28 PM |
| sftp through a script | skotapal | Shell Programming and Scripting | 1 | 05-23-2003 01:26 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
help with SFTP script in Except
Hi All,
I wrote a simple script in "Expect" for SFTP. I need to send a file every day to client site. Every thing is automated but it needs the password to work. I was told I should use "Except" so I don't need to enter the password. I never wrote any script in Except, I am not sure if this is correct. But when I run it, still asks for the password. Please advise. #!/usr/local/bin/expect spawn sftp -b infofile user@prod expect "xyzpasswd:" send "shhh!\n"; interact On the infofile... This is what I have. On the lcd /home/citi put abc012109.txt quit Last edited by samnyc; 01-22-2009 at 03:13 PM.. |
|
||||
|
It is Expect, not Except. Spelling is important in IT!
Try using autoexpect to generate your script. It records your session so that you can run it automatically the next time. Modify the generated script to remove any unnecessary stuff (usually it records too much). |
|
||||
|
Hi Sysgate,
Thank you so much for your help. I am able to log into the other server fine but I can't seem to put the file. Message I get is... put /home/citi/test.txtsftp> quit File "/home/citi/test.txtquit" not found. sftp> After 10 seconds, it times out. I get my prompt back. |
![]() |
| Bookmarks |
| Tags |
| sftp script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|