You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(26) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(5) |
Feb
(3) |
Mar
(11) |
Apr
(10) |
May
(2) |
Jun
(5) |
Jul
(13) |
Aug
(2) |
Sep
(3) |
Oct
(10) |
Nov
(18) |
Dec
(29) |
2002 |
Jan
(12) |
Feb
(14) |
Mar
(73) |
Apr
(28) |
May
(21) |
Jun
(39) |
Jul
(40) |
Aug
(42) |
Sep
(20) |
Oct
(4) |
Nov
(9) |
Dec
(18) |
2003 |
Jan
(2) |
Feb
(8) |
Mar
(6) |
Apr
(24) |
May
(24) |
Jun
(14) |
Jul
(16) |
Aug
(36) |
Sep
(34) |
Oct
(23) |
Nov
(4) |
Dec
(15) |
2004 |
Jan
(6) |
Feb
(13) |
Mar
(7) |
Apr
(5) |
May
(11) |
Jun
(5) |
Jul
(4) |
Aug
|
Sep
(2) |
Oct
(16) |
Nov
(4) |
Dec
(9) |
2005 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
(10) |
May
(5) |
Jun
(13) |
Jul
(3) |
Aug
|
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(9) |
2006 |
Jan
|
Feb
(10) |
Mar
(22) |
Apr
(14) |
May
(5) |
Jun
(4) |
Jul
(19) |
Aug
(7) |
Sep
(16) |
Oct
(4) |
Nov
(1) |
Dec
(16) |
2007 |
Jan
(17) |
Feb
|
Mar
(35) |
Apr
(5) |
May
(20) |
Jun
(11) |
Jul
(33) |
Aug
(3) |
Sep
(2) |
Oct
(11) |
Nov
(23) |
Dec
(5) |
2008 |
Jan
(10) |
Feb
(9) |
Mar
|
Apr
(6) |
May
(8) |
Jun
(7) |
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(20) |
2009 |
Jan
(8) |
Feb
(8) |
Mar
(3) |
Apr
(8) |
May
(2) |
Jun
(11) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(7) |
Dec
(4) |
2010 |
Jan
(2) |
Feb
(1) |
Mar
(3) |
Apr
|
May
(2) |
Jun
(2) |
Jul
(7) |
Aug
(3) |
Sep
(7) |
Oct
(2) |
Nov
(1) |
Dec
(4) |
2011 |
Jan
(4) |
Feb
(5) |
Mar
|
Apr
(3) |
May
(2) |
Jun
|
Jul
(6) |
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(30) |
Apr
(10) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(12) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Blackstone, J. D. <jda...@ci...> - 2002-12-06 22:08:09
|
Looking through some old source code (wow; when did it get to the point that I had "old" code written with Expect.pm?), I discovered some routines where I had written things like: $x->expect("String"); $x->send("a\r"); $x->expect("String2"); Apparently I got confused and was thinking of TCL/Expect's expect command, which does not take the timeout as a parameter. Strangely, this code seems to work. Is the expect() method designed to work like this, or am I just getting lucky by cramming the right things into the buffer in the right order and not running into race conditions? I'll probably digging through the source code to answer this unless someone knows off the top of their head. If this is a feature, not dumb luck, it could go into the docs somewhere. (And if it's in the docs, I'll accept a cluestick to my skull.) Thanks. jdb |
From: Paulo R. <pa...@se...> - 2002-12-04 11:29:24
|
Well the script work ... But i need show the screen come the program, for example i do ls and show to user all files in directory, but the script show ls .... I need show the scrreen, like the user using the program... Tks Paulo season.com.br |
From: Austin S. <te...@of...> - 2002-12-04 08:24:57
|
On Tue, Dec 03, 2002 at 03:54:36PM -0200, Paulo Roberto wrote: > i try but don=B4t work... >=20 > Please send me one example.. >=20 > execute a program > send command > and pick up the screen and show in the web page >=20 #!/usr/bin/perl use Expect; # Print a valid http header. print "Content-Type: text/plain\n\n"; # Execute a shell $expect =3D Expect->spawn('sh'); # Send it a command print $expect "ls\n"; # Give it a second to run. Skip trying to match a prompt since the # prompt may be any of $#%>, and I'm too lazy to guess at a foolproof # regex. $expect->expect(1); =20 print "Listing: " . $expect->before(); Works for me. But the point is with a curses interface maybe the program doesn't redraw the whole screen, so you may not be able to just l= ook at $expect->before(). You'll have to try it and see. Don't forget to look at your web error logs. Austin |
From: Paulo R. <pa...@se...> - 2002-12-03 17:55:44
|
i try but don´t work... Please send me one example.. execute a program send command and pick up the screen and show in the web page tks.. Paulo season.com.br |
From: Austin S. <te...@of...> - 2002-12-03 17:26:01
|
On Tue, Dec 03, 2002 at 12:18:52PM -0500, Rogaski, Mark, ALCNS wrote: > : From: Austin Schutz [mailto:te...@of...] > :=20 > : On Tue, Dec 03, 2002 at 01:35:53PM -0200, Paulo Roberto wrote: > : > Hi, i=B4m from Brazil, and i try make interface program (with=20 > : terminal 3270) to web... > : >=20 > : > I have so problem, may someone could help me.... > : >=20 > : > I need execute e send commands to program, and pick up the=20 > : screen and show to user in web... > : > Execute i can, but pick up the screen and send command i don=B4t kn= ow > : > Down have the script ... > :=20 > : Try setting $Expect::Exp_Internal and $Expect::Debug=20 > : and see if those > : help show why it's not matching 'data: .*'. It may be, if=20 > : it's a curses client, > : that it doesn't actually print 'data: ' each time it puts new=20 > : data on the > : screen. > :=20 >=20 > I've worked with another control-character-happy interface, too. What = I usually do is use the UNIX 'script' utility to capture a manual session= , then I examine the captured data in 'less' (a recent, 8-bit capable rel= ease) or with 'cat -vAT' to figure out what sort of junk is being inserte= d in the text I'm trying to match. >=20 The control characters should be escaped when printed when exp_internal is used, for what that's worth. Either method _should_ work. Austin |
From: Rogaski, M. A. <ro...@at...> - 2002-12-03 17:19:02
|
: From: Austin Schutz [mailto:te...@of...] :=20 : On Tue, Dec 03, 2002 at 01:35:53PM -0200, Paulo Roberto wrote: : > Hi, i=B4m from Brazil, and i try make interface program (with=20 : terminal 3270) to web... : >=20 : > I have so problem, may someone could help me.... : >=20 : > I need execute e send commands to program, and pick up the=20 : screen and show to user in web... : > Execute i can, but pick up the screen and send command i don=B4t = know : > Down have the script ... :=20 : Try setting $Expect::Exp_Internal and $Expect::Debug=20 : and see if those : help show why it's not matching 'data: .*'. It may be, if=20 : it's a curses client, : that it doesn't actually print 'data: ' each time it puts new=20 : data on the : screen. :=20 I've worked with another control-character-happy interface, too. What I = usually do is use the UNIX 'script' utility to capture a manual session, = then I examine the captured data in 'less' (a recent, 8-bit capable = release) or with 'cat -vAT' to figure out what sort of junk is being = inserted in the text I'm trying to match. Mark -- [] Mark Rogaski "Computers save time like=20 [] AT&T Frame Relay Service kudzu prevents soil erosion" [] email: ro...@at... -- Al Castanoli [] voice: 732-885-7534 fax: 732-885-7699 [] pager: 888-858-7243 pin 200853 or 20...@pa...=20 |
From: Austin S. <te...@of...> - 2002-12-03 17:07:04
|
On Tue, Dec 03, 2002 at 01:35:53PM -0200, Paulo Roberto wrote: > Hi, i=B4m from Brazil, and i try make interface program (with terminal = 3270) to web... >=20 > I have so problem, may someone could help me.... >=20 > I need execute e send commands to program, and pick up the screen and s= how to user in web... > Execute i can, but pick up the screen and send command i don=B4t know > Down have the script ... Try setting $Expect::Exp_Internal and $Expect::Debug and see if those help show why it's not matching 'data: .*'. It may be, if it's a curses c= lient, that it doesn't actually print 'data: ' each time it puts new data on the screen. Austin <script snipped> |
From: Paulo R. <pa...@se...> - 2002-12-03 15:43:40
|
Hi, i´m from Brazil, and i try make interface program (with terminal 3270) to web... I have so problem, may someone could help me.... I need execute e send commands to program, and pick up the screen and show to user in web... Execute i can, but pick up the screen and send command i don´t know Down have the script ... Thanks the script has write by Va...@Di... but in the line 161 or show me a error $x3270->expect(60,'-re','data: .*') || die "Unexpected error in x3270_ascii"; $s=$x3270->exp_match(); use Expect; $Expect::Log_Stdout=0; # On by default. # #====================================================================== # timeout print an error message and exit #====================================================================== # sub timeout { print STDERR "Unexpected timeout\n"; exit 2; } # #====================================================================== # x3270_die print the last AS400 screen and die #====================================================================== # sub x3270_die { my $s; print STDERR "----------- Last AS/400 Screen\n"; $s=x3270_asciiscreen(); print STDERR "$s"; print STDERR "-------------------------------\n"; print STDERR @_; die; } # #====================================================================== # x3270_connect Connet to the AS400 (only connection no logon) # return 1 on success, 0 on failure #====================================================================== # sub x3270_connect { print STDERR "Connecting to: $as400\n"; print $x3270 "Connect($as400)\n"; print $x3270 "Wait()\n"; unless ($x3270->expect(30,'-re', "U F U C.$as400.*")) { return 0; } print STDERR "-->x3270_connect: connected\n"; return 1; } # #====================================================================== # x3270_login logon to the AS400 # return 1 on success, 0 on failure #====================================================================== # sub x3270_login { my $corb=x3270_ascii(1,69,8); my ($scr,$days); print STDERR "Findig S65DD4AA found:$corb:\n" if $debug; if ($corb ne "S65DD4AA") { print STDERR "-->x3270_login: Login Screen not found\n"; return 0; }; print STDERR "-->x3270_login: Found Login screen\n"; print $x3270 "String($user)\nTab()\nString($password)\nEnter()\n"; ###### ### skip unusual screens ###### $scr= x3270_asciiscreen(); while ($scr =~ /Press Enter to continue/m) { print $x3270 "Enter()\n"; print STDERR "-->x3270_login: Sent Enter to continue\n"; $scr=x3270_asciiscreen(); } ### end of skipping unusual screens $_=&x3270_ascii(0,32,16); if ($_ ne "AS/400 Main Menu") { print STDERR "-->x3270_login: AS/400 main menu not found\n"; return 0; } print STDERR "-->x3270_login: found AS/400 Main Menu\n"; return 1; } # #====================================================================== # x3270_asciiscreen return in a multiline string the full # AS400 screen (25 rows x 80 columns) #====================================================================== # sub x3270_asciiscreen { return x3270_asciiregion(0,0,24,79); } # #====================================================================== # x3270_asciiregion return in a multiline string of a region of # the AS/400 screen. # Input parameters: # $r starting row (0 ... 24) # $c starting column (0 .. 79) # $rlen region width # $clen region height #====================================================================== # sub x3270_asciiregion { my ($r,$c,$rlen,$clen) = @_; my ($res,$i); print STDERR "--> x3270_asciiregion (r,c,rlen,clen)=$r,$c,$rlen,$clen\n" if $debug; $res=''; for $i ($r .. $r+$rlen-1) { $res .= x3270_ascii($i,$c,$clen); $res .= "\n"; } print STDERR "-->x3270_asciiregion begin ----\n" if $debug; print STDERR $res if $debug; print STDERR "-->x3270_asciiregion end ----\n" if $debug; return $res; } # #====================================================================== # x3270_ascii return an ascii string from the screen # input parameters # $r starting row (0 .. 24) # $c starting column (0 .. 79) # $len string length #====================================================================== # sub x3270_ascii { my ($s,$t); $t=$"; $"=','; print STDERR "--x3270_ascii-->Sending: Ascii(@_)\n" if $debug; print $x3270 "Ascii\n"; sleep(20); $"=$t; print $teste; sleep(20); $x3270->expect(60,'-re','data: .*') || die "Unexpected error in x3270_ascii"; $s=$x3270->exp_match(); chomp $s; print STDERR "--x3270_ascii-->Matching string\n:",$s,":\n***\n" if $debug; $s=~s/data: (.*).$/$1/; print STDERR "--x3270_ascii-->Returning\n:",$s,":\n***\n\n" if $debug; return $s; } # #====================================================================== # x3270_gencmd Execute a generic command, it does expect that after # executing the command to receive a command prompt # input parameters # $cmd command string (example "addlible toollib") #====================================================================== # sub x3270_gencmd { my $cmd=$_[0]; print STDERR "-->x3270_gencmd: $cmd\n"; print $x3270 "String(\"$cmd\")\nEnter()\n"; my $str=x3270_ascii(19,0,5); if ($str eq ' ===>') { return 1; } else { print "-->x3270_gencmd str: $str\n"; return 0; } } # #====================================================================== # x3270_prtflayout print file layout #====================================================================== # sub x3270_prtflayout { my($lib,$file)=@_; x3270_gencmd("addlible toollib *last") || x3270_die("Error in addlible\n"); x3270_gencmd("prtffd file($lib/$file)") || x3270_die("Error in prtffd\n"); } # #====================================================================== # x3270_getsplflist gives the "wrksplf" command and return # an array of hashes; each element in the array # is for each spool file; each hash as the # following keys: file, user, device, userdata, # sts, totalpages, formtype, pty, # cdate, ctime, filenbr, job, # number, queue, library # input parameters # $usersplf parameters to the wrksplf command # #====================================================================== # sub x3270_getsplflist { my $usersplf=$_[0]; print STDERR "--->x3270_getsplflist\n"; my ($s,%e,@e,@lst,$void); print $x3270 "String(\"wrksplf $usersplf\")\nEnter()\n"; my $scr1=x3270_asciiscreen(); print STDERR "(0)\n"; my $firsttime=1; while (($scr1=~/\s+More\.\.\./m) or ($firsttime)) { $firsttime=0; $scr1=x3270_asciiscreen(); print STDERR "(0b)\n"; if (not $scr1=~"Work with All Spooled Files") { print STDERR "(0c)\n"; x3270_die("Error in wrksplf\n"); } print STDERR "(2)\n";sleep(1); print $x3270 "PA(1)\nPF(11)\n"; my $scr2=x3270_asciiscreen(); print STDERR "(3)\n"; sleep(1); print $x3270 "PA(1)\nPF(11)\n"; my $scr3=x3270_asciiscreen(); my @scr1=split /\n/m,$scr1; my @scr2=split /\n/m,$scr2; my @scr3=split /\n/m,$scr3; for $i (0 .. scalar @scr1) { if ($scr1[$i]=~/^ [A-Z]/) { @e=split /\s+/,$scr1[$i]; ($void,$e{file},$e{user},$e{device},$e{userdata},$e{sts}, $e{totalpages})=@e; @e=split /\s+/,$scr2[$i]; ($void, $e{file},$e{user},$e{formtype},$e{pty},$e{cdate}, $e{ctime})=@e; @e=split /\s+/,$scr3[$i]; ($void,$e{file},$e{filenbr},$e{job},$e{user},$e{number},$e{queue}, $e{library})=@e; push @lst,{ %e }; } } print $x3270 "PA(1)\nPF(11)\n"; print $x3270 "PA(1)\nPF(11)\n"; print $x3270 "PF(8)\n"; } print $x3270 "PA(1)\nPF(3)\n"; @x3270_splflst=@lst; } # #====================================================================== # x3270_dspffd return a mutiline string: the output of the # dspffd (display file field description) command # input parameters: # $library # $file #====================================================================== # sub x3270_dspffd { my ($library,$file)=@_; my ($s,$scr,@scr,$firsttime); print STDERR "--->x3270_dspffd\n"; print $x3270 "String(\"dspffd file($library/$file)\")\nEnter()\n"; my $scr=x3270_asciiscreen(); print STDERR "(0)\n"; $firsttime=1; $s=""; while (($scr=~/\s+More\.\.\./m) or ($firsttime)) { $firsttime=0; $scr=x3270_asciiscreen(); print STDERR "(0b)\n"; if (not $scr=~"Display Spooled File") { print STDERR "(0c)\n"; x3270_die("Error in dspffd\n"); } print STDERR "(2)\n";sleep(1); @scr=split /\n/m,$scr; $s=$s . join("\n",@scr[5 .. 20]) . "\n"; print $x3270 "PF(8)\n"; } return $s; } 1; Down have the main program use Getopt::Std; require "as400-include.pl"; $|=1; # #====================================================================== # Process options #====================================================================== # #getopts('u:p:l:f:d:x'); #if (not ($opt_u and $opt_p and $opt_l and $opt_f)) { # usage(); # exit; #} $debug="0"; $user="LUIS"; $upuser= uc $user; $password="10"; $as400="nerdc.ufl.edu:23"; $library="file"; $uplibrary=uc $library; $file="teste"; $upfile=uc $file; #if ($opt_x) { # $x3270cmd="x3270 -script -model 2 -color"; #} else { $x3270cmd="/home/paulo/s3270-3.2/s3270 -model 2"; #} # #====================================================================== # usage #====================================================================== # #sub usage { # print STDERR "usage: $0 [-d debuglevel] [-x] -u userid -p password -l library -f file\n"; # print STDERR " debuglevel a value between 0-9\n"; # print STDERR " -x display the x3270 window emulator\n"; #} # #====================================================================== # ffd2layout File field description to layout # input # $sin string output of the x3270_dspffd function # returned value # string in my own layout format # #====================================================================== # sub ffd2layout { my $sin=$_[0]; my ($s,$sout,$fname,$firsttime); my ($fname,$ft,$flng,$frlen,$ffrm,$fto); my %tb = ( CHAR => 'A', PACKED => 'P', ZONED => 'S' ); $sout=""; my @sin=split("\n",$sin); # ##### skip to the beginning of field descriptions # do { $s=shift @sin; } until ($s=~'Field Type Length Length Position Usag'); # ##### extract field definitions # $firsttime=1; while (defined ($s=shift @sin)) { if ( $s=~/^ (\S.........) (\S........) (...)(...) (......) (......)/ # "^ (\PLANN ) (\PACKED ) ( 5)( 0) ( 3) ( 51) ) { if (not $firsttime) { $sout .= sprintf(" %-10s %-36s %-1s %+3s %+2s %+6s %+6s %+4s\n", $fname,$fdescr,$tb{$ft},$flng,$fdc,$frlen, $ffrm,$fto); undef $fdescr; } else { $firsttime=0; } $fname=$1; # field name $ft=$2; # field type $flng=$3; # field lenght $fdc=$4; # field num. of decimals $frlen=$5; # field real (num of bytes) length $ffrm=$6; # field starting position (from) $fto=$ffrm+$frlen-1; #field ending position (to) $ft=~s/ +$//; if ($flng eq ' ') { $flng=$fdc; $fdc=""; } else { $fdc=substr($fdc,-2); } } elsif ($s=~/^ Field text [\. ]+:\s+(.*)$/) { $fdescr=$1; $fdescr=substr($fdescr,0,36); } } $sout .= sprintf(" %-10s %-36s %-1s %+3s %+3s %+6s %+6s %+4s\n", $fname,$fdescr,$tb{$ft},$flng,$fdc,$frlen, $ffrm,$fto); return $sout; } # #====================================================================== # Main program #====================================================================== # $x3270 = Expect->spawn($x3270cmd) || die "error spawning x3270\n"; sleep(2); x3270_connect() || x3270_die("Didn't connect\n"); x3270_login() || x3270_die("Cannot login\n"); $s=x3270_dspffd($library,$file) || x3270_die("Error executing dsptrk\n"); print ffd2layout($s); exit; Paulo season.com.br |
From: Roland G. <RGi...@cp...> - 2002-12-03 09:41:38
|
> I am writing a telnet interface to a system and I need to send > a break to wake the remote system up. > > How do I send a BRKINT? You probably mean how to send a BREAK, which is special to telnet and not a regular ASCII character. If not, just send the corresponding ASCII character (Ctrl-C? Ctrl-Z?). May I direct your attention to Net::Telnet, which provides a thorough interface to (I think) all aspects of the telnet protocol ('break' in that case) and also has the advantage that no process has to be spawned. And you can use it together with Expect by passing the Net::Telnet filehandle to exp_init(), as reported by at least one user. Be sure to keep a copy of the original filehandle around for access to the telnet functionality, as Expects exp_init rather rudely reblesses the filehandle (I'll fix that in a future release). Hope this helps, Roland -- RGi...@cp... |
From: \john.huysing\ <Joh...@te...> - 2002-12-03 00:21:30
|
I am writing a telnet interface to a system and I need to send a break to wake the remote system up. How do I send a BRKINT? John |
From: expect <ex...@ih...> - 2002-11-25 16:44:18
|
On Mon, 25 Nov 2002 14:32:16 +0100 Roland Giersig <RGi...@cp...> wrote: > > When choosing one script, things break. But choosing the other sh > > script, things work fine. The sh scripts are very similar and > > written using the same sh functions, etc. > > Without the sh scripts its a rather long guess at what might be wrong... Yes, wish I could include them. > > > Now I cut-n-pasted the Expect code, from the perl > > script that is failing to run the sh script, and created a small > > version that does just the Expect part and things work as expected > > (pun). > > > > My guesses were that something wonky was going on with redirecting > > STDOUT and STDERR to log files. > > Is one of the shell scripts putting commands in the background? That > might be a problem... I don't think so but they are running other sh scripts. I don't understand a few things from this output. Why is there more than one hard close? Lines 8 and 26. And what is timing out after ~12 seconds? Line 22 (I measured 12 seconds) . And last why does the string I'm waiting for appear after Expect finally completes and closes everything? This bit of output is what's seen when it fails: -start snippet 1:Spawned '/temp/testinstall.sh' 2: spawn id(9) 3: Pid: 794708 4: Tty: /dev/pts/2 5: Expect::spawn('Expect', '/temp/testinstall.sh') called at ./testinst.pl line 347 6: Use of uninitialized value in concatenation (.) or string at /usr/btools/perl/lib/site_perl/5.6.1/Expect.pm line 1386. 7: Closing . 8: Expect::hard_close('Expect=GLOB(0x20589328)') called at /usr/btools/perl/lib/site_perl/5.6.1/Expect.pm line 1575 9: Expect::DESTROY('Expect=GLOB(0x20589328)') called at ./testinst.pl line 354 10: eval {...} called at ./testinst.pl line 354 11: closed. 12: Closing spawn id(9). 13: Expect::soft_close('Expect=GLOB(0x205ab95c)') called at ./testinst.pl line 411 14: --------------------------------- 15: Installation 16: --------------------------------- 17: 18: Menu 19: 1) Create a new install 20: 2) Drop an install 21: 3) QUIT 22: Timed out waiting for an EOF from spawn id(9). 23: spawn id(9) closed. 24: Pid 794708 of spawn id(9) exited, Status: 0x01 25: Closing spawn id(9). 26: Expect::hard_close('Expect=GLOB(0x205ab95c)') called at /usr/btools/perl/lib/site_perl/5.6.1/Expect.pm line 1575 27: Expect::DESTROY('Expect=GLOB(0x205ab95c)') called at ./testinst.pl line 0 28: eval {...} called at ./testinst.pl line 0 29: Make a choice: [3] --end snippet > > > So I am really puzzled as to why this is failing. > > Please post those shell scripts... Wish I ccould. |
From: Roland G. <RGi...@cp...> - 2002-11-25 13:33:12
|
> When choosing one script, things break. But choosing the other sh > script, things work fine. The sh scripts are very similar and > written using the same sh functions, etc. Without the sh scripts its a rather long guess at what might be wrong... > Now I cut-n-pasted the Expect code, from the perl > script that is failing to run the sh script, and created a small > version that does just the Expect part and things work as expected > (pun). > > My guesses were that something wonky was going on with redirecting > STDOUT and STDERR to log files. Is one of the shell scripts putting commands in the background? That might be a problem... > So I am really puzzled as to why this is failing. Please post those shell scripts... Roland -- RGi...@cp... |
From: Roland G. <RGI...@cp...> - 2002-11-24 15:24:14
|
While Expect is supposed to be reasonably threadsafe, IO-Tty is *not*, that's where the problems come from. If you want to automate telnet, using Net::Telnet with Expect should be possible under threads. Hope this helps, Roland ro...@en... wrote: > Hi I use some ugly code and I am investigating whether I can "clean it up" > with modules and the new threading support in perl. Is Expect.pm a thread-safe > module? If it is I must be doing something wrong, because I cannot even > get the *basics* working. |
From: <ro...@en...> - 2002-11-24 14:15:43
|
Hi I use some ugly code and I am investigating whether I can "clean it up" with modules and the new threading support in perl. Is Expect.pm a thread-safe module? If it is I must be doing something wrong, because I cannot even get the *basics* working. I apologize for posting multiple lines of code, but I am doing my best to keep it short. The following code works fine - no problems: ---- #!/usr/local/perli-5.8.0/bin/perl use strict; use threads; use Expect; sub mysub { my $remoteshell; unless ( $remoteshell = Expect -> spawn ("ssh2 192.168.1.1") ) { die "error spawning"; } $remoteshell -> log_stdout(1); unless ( $remoteshell -> expect (120, [ "ssword:" => sub { $remoteshell -> send ("mypassword\n"); } ], ) ) { die "no password prompt"; } unless ( $remoteshell -> expect (20,"ro\@charon:") ) { die "no prompt"; } print $remoteshell "touch /tmp/hopo\n"; $remoteshell ->soft_close(); } &mysub; ---- However, if I replace the call to mysub with the following: my $h = threads->new(\&mysub); $h->join; The program dies instantly with the error: thread failed to start: no password prompt at ./expect.pl line 21. From the processlist I can see that an ssh2 is launched, but the calling program does not even wait the 120 second timeout before dieing with the above error. If anyone can offer any advice to solve this I would be most grateful. Thanks, Rohit Kumar Mehta |
From: expect <ex...@ih...> - 2002-11-23 20:31:19
|
First I'll try to frame the problem as best as I can. I am using Expect to run sh scripts that are normally used interactively. In the production script different sh scripts are run depending on what's passed to the perl script via Getopt::Long. When choosing one script, things break. But choosing the other sh script, things work fine. The sh scripts are very similar and written using the same sh functions, etc. Now I cut-n-pasted the Expect code, from the perl script that is failing to run the sh script, and created a small version that does just the Expect part and things work as expected (pun). My guesses were that something wonky was going on with redirecting STDOUT and STDERR to log files. But changing those things has not been fruitful. So I am really puzzled as to why this is failing. As a possible clue the sh script seems to pause for ~12 seconds before printing out the final menu choice with the default answer. The menu is displayed using a cat <<EOF --------------------------------- Installation --------------------------------- Menu 1) Create a new install 2) Drop an install 3) QUIT EOF and the final choice query and default answer are displayed using echo " Make a choice: [3] \c" 1>&2 Spawned '/temp/testinstall.sh' spawn id(9) Pid: 794708 Tty: /dev/pts/2 Expect::spawn('Expect', '/temp/testinstall.sh') called at ./testinst.pl line 347 Use of uninitialized value in concatenation (.) or string at /usr/btools/perl/lib/site_perl/5.6.1/Expect.pm line 1386. Closing . Expect::hard_close('Expect=GLOB(0x20589328)') called at /usr/btools/perl/lib/site_perl/5.6.1/Expect.pm line 1575 Expect::DESTROY('Expect=GLOB(0x20589328)') called at ./testinst.pl line 354 eval {...} called at ./testinst.pl line 354 closed. Closing spawn id(9). Expect::soft_close('Expect=GLOB(0x205ab95c)') called at ./testinst.pl line 411 --------------------------------- Installation --------------------------------- Menu 1) Create a new install 2) Drop an install 3) QUIT Timed out waiting for an EOF from spawn id(9). spawn id(9) closed. Pid 794708 of spawn id(9) exited, Status: 0x01 Closing spawn id(9). Expect::hard_close('Expect=GLOB(0x205ab95c)') called at /usr/btools/perl/lib/site_perl/5.6.1/Expect.pm line 1575 Expect::DESTROY('Expect=GLOB(0x205ab95c)') called at ./testinst.pl line 0 eval {...} called at ./testinst.pl line 0 Make a choice: [3] In the debugger (perl -d perlscript) the perl script hangs forever here waiting for something from the sh script: Expect::AUTOLOAD(/usr/btools/perl/lib/site_perl/5.6.1/Expect.pm:274): 274: my $ref = ref($tmp); Expect::AUTOLOAD(/usr/btools/perl/lib/site_perl/5.6.1/Expect.pm:275): 275: return (wantarray? @{$tmp} : $tmp) if ($ref eq 'ARRAY'); Expect::AUTOLOAD(/usr/btools/perl/lib/site_perl/5.6.1/Expect.pm:276): 276: return (wantarray? %{$tmp} : $tmp) if ($ref eq 'HASH'); Expect::AUTOLOAD(/usr/btools/perl/lib/site_perl/5.6.1/Expect.pm:277): 277: return $tmp; Expect::spawn(/usr/btools/perl/lib/site_perl/5.6.1/Expect.pm:124): 124: my $errstatus = sysread(STAT_RDR, $errno, 256); Here's a snippet from a successful run: # /tmp/exptest.pl /tmp/test.cfg Spawned 'testinstall.sh' spawn id(5) Pid: 753842 Tty: /dev/pts/2 Expect::spawn('Expect', 'testinstall.sh') called at /tmp/exptest.pl line 24 Closing . Expect::hard_close('Expect=GLOB(0x204948ec)') called at /usr/btools/perl/lib/site_perl/5.6.1/Expect.pm line 1575 Expect::DESTROY('Expect=GLOB(0x204948ec)') called at /tmp/exptest.pl line 31 eval {...} called at /tmp/exptest.pl line 31 closed. Starting EXPECT pattern matching... Expect::expect('Expect=GLOB(0x20235440)', undef, '[8]') called at /tmp/exptest.pl line 52 spawn id(5): beginning expect. Timeout: unlimited seconds. Current time: Sat Nov 23 15:01:51 2002 spawn id(5): list of patterns: #1: -ex `[3]' spawn id(5): Does `' match: pattern #1: -ex `[3]'? No. So here I get the "Starting EXPECT pattern matching..." and everything works just as it should. Thanks for any tips you can offer. |
From: expect <ex...@ih...> - 2002-11-22 07:19:20
|
On Wed, 20 Nov 2002 17:22:35 -0500 David Shapiro <Dav...@bt...> wrote: I think you should use the Net::Telnet stuff. > Hello, > > I made a module that uses expect to telnet to a site and capture 5 minutes > of streaming data at the site. The plan was to use threading to have > multiple telnet sessions going at the same time to different hosts. The > problem is that I see the expect session start the telnet, but it quicly > decides there is not match for the -i regexp, sees EOF, and exits. Has > anybody done this kind of thing or know what I need to do to get it to work? > Does it have something to do with STDOUT needing to get past somewhere > somehow? > > The gist of it is: > > package module > use threads; > use Expect; > use strict; > > sub new > $self = { > ip => undef, > stuff here > } > stuff here > bless $self... > } > > sub telnet { > my $self = shift; > lock($self); > my $timeout = 300; > if ($self->{timeout}) { > $timeout = $self->{timeout}; > } > $Expect::Log_Stdout = 0; > $Expect::Exp_Internal = 1 if $self->{debug} > 1; > $Expect::Debug = 1 if $self->{debug} > 2; > $Expect::Log_Stdout = 1 if $self->{debug}; > > $conn = Expect->spawn("/usr/bin/telnet $address"); > sleep 1; > my $spawn_ok; > my $read = undef; > > $conn->expect($timeout, > [ > qr'Username: $', > sub { > $spawn_ok = 1; > my $fh = shift; > $fh->send("$acs_login\r"); > exp_continue; > ], > [ > 'Password: $', > sub { > my $fh = shift; > $conn->clear_accum(); > $fh->send("$acs_passwd\r"); > exp_continue; > } > ], > [ > '-re', '--->$', # Prompt never seen > ], > [ > eof => > sub { > if ($spawn_ok) { > $self->{log}->entry("Disconnected > Login.",DIE); > } else { > $self->{log}->entry("ACS Login not > seen",DIE); > } > } > ], > [ > timeout => > sub { > $read = $conn->exp_before(); > if ($self->{debug}) { > print $fh $read if $self->{debug}; > } > &process_5e_data($self,\$read); > } > ] > ); > return; > > > Program uses module: > > use module.pm > use threads; > > foreach .. { > $switch{$2}{connection} = module::new( > { > ip => $ip, > more here > } > ); > if ($type eq "5e") { > my $thr = > threads->new(\&BTI::Switch::get_5e_report,$switch{$2}{connection}); > push(@site,$thr); > } elsif ( $type eq "600e") { > my $thr = > threads->new(\&BTI::Switch::get_600e_report,$switch{$2}{connection}); > push(@site,$thr); > } > > } > foreach my $thr (@site) { > $thr->join(); > } > > > The debug run looks like: > > spawn id(7): beginning expect. > Timeout: 300 seconds. > Current time: Wed Nov 20 17:25:28 2002 > spawn id(7): list of patterns: > #1: -re `(?-xism:Username: $)' > #2: -re `Password: $' > #3: -re `--->$' > #4: -eof `' > > > spawn id(7): Does `' > match: > pattern #1: -re `(?-xism:Username: $)'? No. > pattern #2: -re `Password: $'? No. > pattern #3: -re `--->$'? No. > pattern #4: -eof `'? No. > > Waiting for new data (300 seconds)... > spawn id(7): new data. > spawn id(7): EOF > Calling EOF hook CODE(0x87b723c)... > ALERT: ACS Login prompt not seen > Closing spawn id(7). > Expect::hard_close('Expect=GLOB(0x87a5bcc)') called at > /usr/local/lib/perl5/site_perl/5.8.0/Expect.pm line 1575 > > Expect::DESTROY('Expect=GLOB(0x87a5bcc)') called at ./collector.pl line 128 > eval > {...} called at ./collector.pl line 128 > > spawn id(7) closed. > Pid 3843 of spawn id(7) terminated, Status: 0x01 > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > |
From: Yang Tj-A. <AT...@mo...> - 2002-11-21 13:48:49
|
Hi, Basically I am looking for "perl test.pl" equivalent of "perl tutorial.pl",ie, works on most Unix. Beginner(like me) need not to do much work to learn and see a set of small tutorial examples works by just typing "perl tutorial.pl" or "sh tutorial.sh". I am a beginner who benefit from this lovely expect.pm. I am willing to co-ordinate and may be generate a expect-perl howto document in Docbook SGML/XML format. I need to introduce expect-perl to my peers (sysadmins) so come up a howto/tutorial document fit my interest and need. Any comments are welcome. T.J. Yang |
From: Jim C. <jc...@di...> - 2002-11-20 23:38:06
|
on linux RH-72 w current 2.4.18 When trying to debug my cruft (elided), I had a consistent problem hooking up to spawned process under the debugger. Ive 'reduced' it to a test-case that doesnt involve any of my stuff :-) The hang under debugger is the same. fia - if this is well known debugger option twizzle.. [root@harpo .cpan/build/Expect-1.15]# perl -d test.pl ... on tests 16, 18not ok 16 # Test failed at test.pl line 86. some string ok 17 not ok 18 # Test failed at test.pl line 95. Testing -notransfer... X some other ok 19 ... ok 24 Testing raw reversing... isatty($exp): YES I control C here, to break hang. Expect::spawn(/usr/local/lib/perl5/site_perl/5.8.0/Expect.pm:125): 125: die "Cannot sync with child: $!" if not defined $errstatus; DB<1> c Cannot sync with child: Interrupted system call at /usr/local/lib/perl5/site_perl/5.8.0/Expect.pm line 125. Expect::spawn('Expect=GLOB(0x860c208)','/usr/local/bin/perl -ne \'chomp; sleep 0; print scalar revers...') called at test.pl line 162 Debugged program terminated. Use q to quit or R to restart, use O inhibit_exit to avoid stopping after program termination, h q, h R or h O to get additional info. DB<1> q [root@harpo Expect-1.15]# a script capture is also attached unedited, but -pi -e's/\r//' cleaned. tia, jimc [root@harpo Expect-1.15]# perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=linux, osvers=2.4.18-12.5, archname=i686-linux uname='linux harpo.jimc.earth 2.4.18-12.5 #1 mon aug 26 08:51:52 edt 2002 i686 unknown ' config_args='-des -Accflags=-DDEBUGGING' hint=previous, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -DDEBUGGING -DDEBUGGING', optimize='-O2', cppflags='-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -DDEBUGGING -DDEBUGGING' ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.2 2.96-108.7.2)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.2.4' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: DEBUGGING USE_LARGE_FILES Built under linux Compiled at Sep 20 2002 03:36:26 @INC: /usr/local/lib/perl5/5.8.0/i686-linux /usr/local/lib/perl5/5.8.0 /usr/local/lib/perl5/site_perl/5.8.0/i686-linux /usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl . |
From: David S. <Dav...@bt...> - 2002-11-20 22:29:03
|
Hello, I made a module that uses expect to telnet to a site and capture 5 minutes of streaming data at the site. The plan was to use threading to have multiple telnet sessions going at the same time to different hosts. The problem is that I see the expect session start the telnet, but it quicly decides there is not match for the -i regexp, sees EOF, and exits. Has anybody done this kind of thing or know what I need to do to get it to work? Does it have something to do with STDOUT needing to get past somewhere somehow? The gist of it is: package module use threads; use Expect; use strict; sub new $self = { ip => undef, stuff here } stuff here bless $self... } sub telnet { my $self = shift; lock($self); my $timeout = 300; if ($self->{timeout}) { $timeout = $self->{timeout}; } $Expect::Log_Stdout = 0; $Expect::Exp_Internal = 1 if $self->{debug} > 1; $Expect::Debug = 1 if $self->{debug} > 2; $Expect::Log_Stdout = 1 if $self->{debug}; $conn = Expect->spawn("/usr/bin/telnet $address"); sleep 1; my $spawn_ok; my $read = undef; $conn->expect($timeout, [ qr'Username: $', sub { $spawn_ok = 1; my $fh = shift; $fh->send("$acs_login\r"); exp_continue; ], [ 'Password: $', sub { my $fh = shift; $conn->clear_accum(); $fh->send("$acs_passwd\r"); exp_continue; } ], [ '-re', '--->$', # Prompt never seen ], [ eof => sub { if ($spawn_ok) { $self->{log}->entry("Disconnected Login.",DIE); } else { $self->{log}->entry("ACS Login not seen",DIE); } } ], [ timeout => sub { $read = $conn->exp_before(); if ($self->{debug}) { print $fh $read if $self->{debug}; } &process_5e_data($self,\$read); } ] ); return; Program uses module: use module.pm use threads; foreach .. { $switch{$2}{connection} = module::new( { ip => $ip, more here } ); if ($type eq "5e") { my $thr = threads->new(\&BTI::Switch::get_5e_report,$switch{$2}{connection}); push(@site,$thr); } elsif ( $type eq "600e") { my $thr = threads->new(\&BTI::Switch::get_600e_report,$switch{$2}{connection}); push(@site,$thr); } } foreach my $thr (@site) { $thr->join(); } The debug run looks like: spawn id(7): beginning expect. Timeout: 300 seconds. Current time: Wed Nov 20 17:25:28 2002 spawn id(7): list of patterns: #1: -re `(?-xism:Username: $)' #2: -re `Password: $' #3: -re `--->$' #4: -eof `' spawn id(7): Does `' match: pattern #1: -re `(?-xism:Username: $)'? No. pattern #2: -re `Password: $'? No. pattern #3: -re `--->$'? No. pattern #4: -eof `'? No. Waiting for new data (300 seconds)... spawn id(7): new data. spawn id(7): EOF Calling EOF hook CODE(0x87b723c)... ALERT: ACS Login prompt not seen Closing spawn id(7). Expect::hard_close('Expect=GLOB(0x87a5bcc)') called at /usr/local/lib/perl5/site_perl/5.8.0/Expect.pm line 1575 Expect::DESTROY('Expect=GLOB(0x87a5bcc)') called at ./collector.pl line 128 eval {...} called at ./collector.pl line 128 spawn id(7) closed. Pid 3843 of spawn id(7) terminated, Status: 0x01 |
From: Austin S. <te...@of...> - 2002-10-29 18:25:02
|
On Tue, Oct 29, 2002 at 11:12:30AM -0600, al....@ac... wrote: > Hello, > > I just installed Perl 5.8 and have down loaded Expect 1.15, and > IO-Tty-1.02 modules. > I tried down loading IO-Pty but noticed that it was pointing to > IO-Tty-1.02 module. > Are these modules consolidated into one module now? If not, can someone > please > provide me with a link to IO-Pty for Solaris 2.8. Also, should these two > modules be > installed in certain order? Thank you for your help. > IO::Pty is part of the IO::Tty package. Austin |
From: <al....@ac...> - 2002-10-29 17:12:46
|
Hello, I just installed Perl 5.8 and have down loaded Expect 1.15, and IO-Tty-1.02 modules. I tried down loading IO-Pty but noticed that it was pointing to IO-Tty-1.02 module. Are these modules consolidated into one module now? If not, can someone please provide me with a link to IO-Pty for Solaris 2.8. Also, should these two modules be installed in certain order? Thank you for your help. This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. |
From: <ab...@en...> - 2002-10-01 17:45:39
|
The problem actually was in the telnet ( the windows version ). Once I switched to the cygwin telnet everything start to work. -----Original Message----- From: Blackstone, J. David [mailto:jda...@ci...] Sent: Tuesday, October 01, 2002 10:34 AM To: Alexander Bourov; RGI...@cp... Cc: exp...@li... Subject: RE: [Expectperl-discuss] Perl, Expect under the Win2k. > -----Original Message----- > From: ab...@en... [mailto:ab...@en...] > Sent: Monday, September 30, 2002 4:58 PM > To: RGI...@cp... > Cc: exp...@li... > Subject: RE: [Expectperl-discuss] Perl, Expect under the Win2k. >=20 >=20 > Roland, the installation went smoothly, but when I tried the=20 > programs, which work ok on solaris, I've got a problem with=20 > telnet connection. > The expect do not go to exp_continue.=20 >=20 > The spawn of telnet was ok. > after this: >=20 > spawn id(4): Does `hello;\r\n' > match: > pattern #2: -ex `TL1 Agent Copyright'? No. > pattern #3: -re `\\[\w+(\-(X|Y))?\] '? No. >=20 > Closing spawn id(4). >=20 > The timeout was 30 sec., but it is getting out of expect loop=20 > ommediately. >=20 > Any ideas? >=20 > How would you suggest and if anybody used the Expect with the=20 > Net::Telnet module? Can you provide the code? |
From: Blackstone, J. D. <jda...@ci...> - 2002-10-01 17:33:55
|
> -----Original Message----- > From: ab...@en... [mailto:ab...@en...] > Sent: Monday, September 30, 2002 4:58 PM > To: RGI...@cp... > Cc: exp...@li... > Subject: RE: [Expectperl-discuss] Perl, Expect under the Win2k. > > > Roland, the installation went smoothly, but when I tried the > programs, which work ok on solaris, I've got a problem with > telnet connection. > The expect do not go to exp_continue. > > The spawn of telnet was ok. > after this: > > spawn id(4): Does `hello;\r\n' > match: > pattern #2: -ex `TL1 Agent Copyright'? No. > pattern #3: -re `\\[\w+(\-(X|Y))?\] '? No. > > Closing spawn id(4). > > The timeout was 30 sec., but it is getting out of expect loop > ommediately. > > Any ideas? > > How would you suggest and if anybody used the Expect with the > Net::Telnet module? Can you provide the code? |
From: <ab...@en...> - 2002-09-30 21:56:10
|
Roland, the installation went smoothly, but when I tried the programs, = which work ok on solaris, I've got a problem with telnet connection. The expect do not go to exp_continue.=20 The spawn of telnet was ok. after this: spawn id(4): Does `hello;\r\n' match: pattern #2: -ex `TL1 Agent Copyright'? No. pattern #3: -re `\\[\w+(\-(X|Y))?\] '? No. Closing spawn id(4). The timeout was 30 sec., but it is getting out of expect loop = ommediately. Any ideas? How would you suggest and if anybody used the Expect with the = Net::Telnet module? -----Original Message----- From: Roland Giersig [mailto:RGI...@cp...] Sent: Friday, September 27, 2002 5:38 PM To: Alexander Bourov Cc: exp...@li... Subject: Re: [Expectperl-discuss] Perl, Expect under the Win2k. ab...@en... wrote: > If anybody using Perl & Expect.pm under the Win2k, could you please = give me recommendations on: > 1. Which Perl to install : Active Perl, CygWin ..... > 2. Any specifics on Expect.pm for Win2k? Expect (more specific: IO-Tty) uses pseudo-terminals, which are only=20 available under CygWin, so that should answer the first question. Apart from that, no, there are no specifics for Win2k that I know of,=20 simply because there is only marginal reason to use Expect on Windows.=20 You see, apart from telnet (try Net::Telnet instead) there are only a=20 few command-line programs on Win2k, so what do you actually want to=20 control with Expect? Sure, Cygwin provides a lot of standard unix=20 tools, but then, why moving to Win2k in the first place? Sorry if this seems like a rant, but you are probably better off if you=20 install Linux on those PCs... Roland -- RGi...@cp... |
From: Roland G. <RGI...@cp...> - 2002-09-28 00:39:00
|
ab...@en... wrote: > If anybody using Perl & Expect.pm under the Win2k, could you please give me recommendations on: > 1. Which Perl to install : Active Perl, CygWin ..... > 2. Any specifics on Expect.pm for Win2k? Expect (more specific: IO-Tty) uses pseudo-terminals, which are only available under CygWin, so that should answer the first question. Apart from that, no, there are no specifics for Win2k that I know of, simply because there is only marginal reason to use Expect on Windows. You see, apart from telnet (try Net::Telnet instead) there are only a few command-line programs on Win2k, so what do you actually want to control with Expect? Sure, Cygwin provides a lot of standard unix tools, but then, why moving to Win2k in the first place? Sorry if this seems like a rant, but you are probably better off if you install Linux on those PCs... Roland -- RGi...@cp... |