Expect and tclsh on OS X


Do anybody know if it is possible to use expect with tclsl on OS X?

Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial. Expect is also useful for testing these same applications. Have a look at http://expect.nist.gov

Expect needs tcl to run. As tclsh (a shell with a tcl interpreter) comes with OS X, I guess that it should be possible to install expect.


On a similar vein, I discovered that Terminal is not AppleScript-able. Too bad.

I was trying to make a script to open a terminal window and run the Links browser.

The closest I got was a *.command file that runs Links, but then the terminal window that opens is about two inches square.

Does anyone have a good idea about how to make a shortcut to Terminal that opens Links?

I Just found a Perl module expect.pm at sourceforge which implement expect functions in Perl. I haven't try to install it so far, but I guess that it should work on OS X too. You also need to install Tty.pm and Stty.pm (CPAN) as I think that they are not installed on OS X.

It might be an easier way to use expect functionality

I will try this tonight.