Telecommunication Scripting Languages? 7
ronzo asks: "I need to write some scripts/programs that call out to a site (modem), login in, send or receive files using kermit or xmodem. Previously I have done this using a language called db/c and did it all through standard in/out. I want to use a open source solution, because this needs to run on a linux box. I've started looking at perl, but the input/keyin type commands seem a little limiting. Any suggestions or ideas? " I thought some kermit clients had a scripting language that you could use to implement something like this. Althogh this IS possible in Perl, I KNOW something to do this exists so writing something to do this from scratch would more than likely be a waste of time.
duh.. (Score:1)
you want Expect (Score:1)
Perl's Expect.pm or Expect (Score:1)
try's to emulate the functionality provided
by Expect (which is tcl based).
I acutally used a Expect script to login
to my last employer's PPP account. It was
quite flexible.
Perl's Expect.pm due to file manipulation (Score:1)
Perl's the way to go... (Score:2)
I wrote some software a couple years ago using USR voice modems (it was a public number, call up, choose a number from the menu, and have some weather data for one of our stations read back to you). It was done in perl, with out own simple module for doing basic handling. If you don't want to try your hand at it yourself, I'm sure there are several modules out there for it (several have suggested Expect.pm so far).
That program was done in a total of about 150 lines for the main portion of it, and another 100-150 lines in our communications module.
I've moved on, and haven't called it in over a year, but if you are ever in the Corpus Christi, TX area, try it out--it should be at (512) 992-WIND (Windinfo, service of the Conrad Blucher Institute for Surveying Science, Division of Nearshore Research).
man chat (Score:1)
I Expect this is repeated information :) (Score:1)
Expect is a TCL extension (TCL is a goofy little embeddable language with only one datatype- string. Fortunately it's not limited to scalar strings, though; it has arrays and lists (but not hashes).
Expect just plain and simple rocks for automating anything. TCL is a snap to learn, and Expect doesn't add too many new commands. There IS a down side, though.
The authors of the program turn a buck via having woefully inadequate documentation with Expect, and telling you to buy the O'Reilley book if you ever hope to make good use of Expect. Well, that might seem like strong-arm tactics, but let me tell you, that $25 O'Reilley book has saved me probably years off of my life
To sum, you're looking for Expect. It's not really free, but it IS worth it.
--Sync