Help ASAP: is TCL mendatory for Expect?
Posted by Panthini (Panthini), 28 September 2005Hi all,
I am new to Expect.
I have few questions:
1) Is it mendatory to use tcl or any other shell script with expect? if yes, Why do we need that?
2) what is difference between tcl and bash? Can I use expect with bash?
3) I tried writing basic script thats does ssh to remote machine using send and expect.
How do I write if-else or for loop usinf expect..where can I find the syntax.
I dont have book "exploring Expect", Please let me know if there are other good resources for beginners.
Thanks in advance.
Posted by admin (Graham Ellis), 28 September 2005Dear Panthini,
I try to see and answer all posts as soon as I can, so there's no need to include "ASAP" in the subject line.
The best reference material for Expect is, indeed, the "Exploring Expect" book and I suggest that you get hold of a copy if you don't have one. As you learn your way into Expect, you'll find that the book becomes progressively more useful to you.
Your other questions are very wide ranging, and I take it that you need to get up to speed very rapidly; Tcl WILL be a necessity as Expect sits on top of it ... and to learn it quickly I''m going to suggest that you have a look at training courses as the tutor will be able to take you though each of the steps in turn, within just a couple of days. The course I've linked to just above DOES include Expect; that won't apply to every Tcl course you find.
1. Yes - you need Tcl; Expect is an extension to Tcl and you can't extend something you don't have.
2. Expect is an extension to the Tool Control Language - a programming language. Bash is a shell - a command line interpretter that's extended into becoming something of a programming language. You can run Expect within Bash provided that you also have Tcl in between.
3. To answer this quiestion, I would be putting a complete training course on line and a forum is not a good medium for this. Just not practical to learn a complete language efficiently through a series of questions and answers. However, there are examples and resources on our web site - specific examples and articles on loops and conditionals and Tcl may be found on our site.
Posted by Panthini (Panthini), 28 September 2005Thanks a lot.
Your answer has made many things cleared.
Please update me when you put the training course online as you said in 3rd point.
Posted by admin (Graham Ellis), 28 September 2005All the examples in the training course are online already, so that trainees who have attended the courses and people who just need to see examples of specific are catered for. We've considered (and rejected) online training in the past; our notes and style are best suited for a more "classic" training environment, and we would be speading ourselves too thinly to try and do an online product as well.
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: firstname.lastname@example.org • WEB: http://www.wellho.net • SKYPE: wellho