Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
single script handling two processes in two diff p

Posted by sharmila (sharmila), 6 October 2005
I have a single script.I need the script to start 2 telnets in two diff processes.It starts two telnets processes in two diff machines but couldn't give expected outputs.Is it script  problem or processor which handles the script create problem?
My problem is :
I have a single script.
It takes commands through a file.
First half of the file is talking to a processor and starts telnet and does all work.
Next half of the script is to talk with a completely diff. processor.It starts telnet and does all the work.
But these 2 processors have to talk to each other according to my software.It doesnt.
Please give a solution....please.

Posted by admin (Graham Ellis), 7 October 2005
If you've got an expect process talking to remote machine "X" via telnet and also talking to remove machine "Y" via telnet, you can have a process on machine X influence a process on machine Y by ...

1. Running a command via the telnet you've spawned on machine X that outputs the data you want to use on machine Y

2. Gather that data in your expect process (via expect's output buffer) into a Tcl variable

3. Use the data gathered as part of a command or response within the spawned process you're using to talk to machine Y.

There isn't any direct connection set up between machines X and Y; there are ways you could do that such as running expect an expect program on one of the remote systems from within the telnet session, but I would advise against this. because it would be hard to maintain and debug, it would mean that you had to load and maintain expect on two systems, and that your systwm would involve two scripts that had to be kept in sync rather than just the one.


Posted by sharmila (sharmila), 7 October 2005
Thanks..



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho