![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calling expect scripts from other expect scripts | seva | Shell Programming and Scripting | 0 | 04-03-2008 02:45 PM |
| tcl/expect | calsum | Shell Programming and Scripting | 7 | 03-26-2008 01:23 AM |
| Tcl expect HELP | dave_m | Shell Programming and Scripting | 0 | 02-27-2008 11:08 AM |
| Expect and auto expect command | arun_v | Shell Programming and Scripting | 0 | 03-29-2006 08:31 AM |
| Expect with tcl/tk | sanjustudy | Shell Programming and Scripting | 0 | 10-10-2005 06:48 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Expect/Tcl help?
Does anyone know of an expect/tcl forum that is as helpful as this one is for shell scripting?
Or if anyone has any expect knowledge, can you please provide some guidance on how to write to a local error log based on output from a ssh session? I have something like this: Code:
foreach host $hostlist {
spawn ssh -oPort=22 -oStrictHostKeyChecking=no -oCheckHostIP=no $USER@$host-sdp
expect {
"Connection closed by remote host" { puts "$host is down. Please try again later."; continue }
"password:" { send "$PASSPH\r" }
How do I a.) initialize the log file and b.) write to it in the case of an error? Thanks for any help. Again, I realize this isn't the forum for expect/tcl, but it has been very helpful to me in the past in learning shell scripting, so hopefully someone can provide some insight or at least point me in the right direction. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|