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: Roland G. <RGi...@cp...> - 2006-05-05 14:13:04
|
Available from your nearest CPAN mirror. I finally found the time for incorporating some bugfixes and doing some testing, unfortunately only on Linux, AIX 5.3 and Cygwin. Feedback for other OSs appreciated. IO-Tty shouldn't warn about bad ioctl constants anymore and also build better on HPUX and Z/OS (and any other compiler that uses shell metachars for compiler options). For Expect I (hopefully) fixed a hangup-problem on AIX 5.2, also a hangup for send_slow and $? corruption in DESTROY. Cheers, Roland -- RGi...@cp... |
From: Mopuri, S. <sha...@in...> - 2006-04-24 21:22:47
|
I am stuck with Telnet as SSH is not supported for what I am trying to do. Thanks, Shailaja=20 -----Original Message----- From: exp...@li... [mailto:exp...@li...] On Behalf Of BassPlayer Sent: Friday, April 21, 2006 1:09 PM To: exp...@li... Subject: RE: [Expectperl-discuss] Telnet not working from Cygwin when using Expect/Perl I played around with this some and on my XP PRO system OS Name Microsoft Windows XP Professional Version 5.1.2600 Service Pack 2 Build 2600 With the latest cygwin (cygcheck -s) Cygwin DLL version info: DLL version: 1.5.19 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 150 Shared data: 4 DLL identifier: cygwin1 Mount registry: 2 Cygnus registry name: Cygnus Solutions Cygwin registry name: Cygwin Program options name: Program Options Cygwin mount registry name: mounts v2 Cygdrive flags: cygdrive flags Cygdrive prefix: cygdrive prefix Cygdrive default prefix: Build date: Fri Jan 20 13:28:43 EST 2006 CVS tag: cr-0x5ef Shared id: cygwin1S4 I get the same thing. Using your slightly modified code #!/usr/bin/perl use Expect; $Expect_Handle =3D new Expect; $Responses =3D "grimlock ogin: "; $Expect::Debug=3D1; $Result =3D $Expect_Handle->spawn('telnet grimlock'); $Pattern_ID =3D $Expect_Handle->expect($Timeout,'-re', $Responses); I get $ perl test.pl spawn id(3): beginning expect. Timeout: unlimited seconds. Current time: Fri Apr 21 12:27:47 2006 Waiting for new data (unlimited seconds)... spawn id(3): new data. spawn id(3): EOF spawn id(3): exit(0xFF00) spawn id(3): closing... Returning from expect with TIMEOUT or EOF But if I change from telnet to ssh, things seem normal $ perl test.pl spawn id(3): beginning expect. Timeout: unlimited seconds. Current time: Fri Apr 21 12:29:07 2006 Waiting for new data (unlimited seconds)... spawn id(3): new data. spawn id(3): read 52 byte(s). Enter passphrase for key '/home/myuser/.ssh/id_dsa': Waiting for new data (unlimited seconds)... Looks like telnet to me. Can you use ssh? BP Mopuri, Shailaja wrote: > Hi, > Sorry for skipping the details. What I am trying to say is, telnet is > not spawned as I don't see it in the Task Manager Processes window. I > don't get any errors but telnet is not invoked. I did try using > Net::Telnet but did not make any difference. As for "\n", the shell does > strip the whitespace. > > Thanks for responding to my mail. > > Shailaja > > -----Original Message----- > From: Roland Giersig [mailto:RGi...@cp...] > Sent: Friday, April 21, 2006 1:38 AM > To: Mopuri, Shailaja > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] Telnet not working from Cygwin when > using Expect/Perl > > Quoting "Mopuri, Shailaja" <sha...@in...>: > >> Hi, >> I am trying to invoke telnet using Expect from Perl in Cygwin. The >> same >> code works in Linux systems which means there is something different >> when invoked from Cygwin shell. Can anyone suggest any workarounds or >> suggestions to fix this issue. > > What are the symptoms of the failure? Any error messages? "This does not > work" is not an allowed problem-description for a technician... :-) > > Alternatively you could try to use Net::Telnet to connect and pass its > filehandle to exp_init, so you would avoid the cygwin shell and ptys > alltogether. > >> Below is the sample code that I am trying to get it work >> >> Thanks, >> Shailaja >> >> #!/usr/bin/perl >> >> # use module >> use XML::Simple; >> use Expect; >> >> #Create the Expect handle >> $Expect_Handle =3D3D new Expect; >> $Cmds =3D3D "telnet atsism01 623"; >> $Responses =3D3D "server:"; >> $Result =3D3D $Expect_Handle->spawn($Cmds."\n"); > > Why the "\n"? This would make the last argument "623\n" (if the shell > wouldn't strip whitespace). > >> # Clears the previous output accumulated incase of match failures >> $Expect_Handle->clear_accum(); >> $Pattern_ID =3D3D $Expect_Handle->expect($Timeout,'-re', $Responses); >> #Capture the current prompt >> $Current_Prompt =3D3D $Expect_Handle->match(); >> #Capture the output >> $ActualOutput =3D3D $Expect_Handle->before().$Current_Prompt; >> =3D09 >> > > -- > RGi...@cp... > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd_____________________________________ __________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > !DSPAM:4448f1cd103472959816485! > ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642 _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: Austin S. <te...@of...> - 2006-04-23 18:15:48
|
Maybe the path needs to be specified, e.g. /usr/bin/telnet. There is a microsoft telnet client also, which probably won't work. Austin On Fri, Apr 21, 2006 at 05:11:20PM -0700, David Bellizzi wrote: > > I played around with this some and on my XP PRO system > > OS Name Microsoft Windows XP Professional > Version 5.1.2600 Service Pack 2 Build 2600 > > With the latest cygwin (cygcheck -s) > Cygwin DLL version info: > DLL version: 1.5.19 > DLL epoch: 19 > DLL bad signal mask: 19005 > DLL old termios: 5 > DLL malloc env: 28 > API major: 0 > API minor: 150 > Shared data: 4 > DLL identifier: cygwin1 > Mount registry: 2 > Cygnus registry name: Cygnus Solutions > Cygwin registry name: Cygwin > Program options name: Program Options > Cygwin mount registry name: mounts v2 > Cygdrive flags: cygdrive flags > Cygdrive prefix: cygdrive prefix > Cygdrive default prefix: > Build date: Fri Jan 20 13:28:43 EST 2006 > CVS tag: cr-0x5ef > Shared id: cygwin1S4 > > I get the same thing. > > Using your slightly modified code > > #!/usr/bin/perl > use Expect; > $Expect_Handle = new Expect; > $Responses = "grimlock ogin: "; > $Expect::Debug=1; > $Result = $Expect_Handle->spawn('telnet grimlock'); > $Pattern_ID = $Expect_Handle->expect($Timeout,'-re', $Responses); > > I get > > $ perl test.pl > spawn id(3): beginning expect. > Timeout: unlimited seconds. > Current time: Fri Apr 21 12:27:47 2006 > Waiting for new data (unlimited seconds)... > spawn id(3): new data. > spawn id(3): EOF > spawn id(3): exit(0xFF00) > spawn id(3): closing... > Returning from expect with TIMEOUT or EOF > > But if I change from telnet to ssh, things seem normal > > $ perl test.pl > spawn id(3): beginning expect. > Timeout: unlimited seconds. > Current time: Fri Apr 21 12:29:07 2006 > Waiting for new data (unlimited seconds)... > spawn id(3): new data. > spawn id(3): read 52 byte(s). > Enter passphrase for key '/home/myuser/.ssh/id_dsa': Waiting for new data > (unlimited seconds)... > > Looks like telnet to me. Can you use ssh? > BP > > Mopuri, Shailaja wrote: > > Hi, > > Sorry for skipping the details. What I am trying to say is, telnet is > not spawned as I don't see it in the Task Manager Processes window. I > don't get any errors but telnet is not invoked. I did try using > > Net::Telnet but did not make any difference. As for "\n", the shell does > strip the whitespace. > > > > Thanks for responding to my mail. > > > > Shailaja > > > > -----Original Message----- > > From: Roland Giersig [mailto:RGi...@cp...] > > Sent: Friday, April 21, 2006 1:38 AM > > To: Mopuri, Shailaja > > Cc: exp...@li... > > Subject: Re: [Expectperl-discuss] Telnet not working from Cygwin when > using Expect/Perl > > > > Quoting "Mopuri, Shailaja" <sha...@in...>: > > > >> Hi, > >> I am trying to invoke telnet using Expect from Perl in Cygwin. The same > >> code works in Linux systems which means there is something different > when invoked from Cygwin shell. Can anyone suggest any workarounds or > suggestions to fix this issue. > > > > What are the symptoms of the failure? Any error messages? "This does not > work" is not an allowed problem-description for a technician... :-) > > > > Alternatively you could try to use Net::Telnet to connect and pass its > filehandle to exp_init, so you would avoid the cygwin shell and ptys > alltogether. > > > >> Below is the sample code that I am trying to get it work > >> > >> Thanks, > >> Shailaja > >> > >> #!/usr/bin/perl > >> > >> # use module > >> use XML::Simple; > >> use Expect; > >> > >> #Create the Expect handle > >> $Expect_Handle =3D new Expect; > >> $Cmds =3D "telnet atsism01 623"; > >> $Responses =3D "server:"; > >> $Result =3D $Expect_Handle->spawn($Cmds."\n"); > > > > Why the "\n"? This would make the last argument "623\n" (if the shell > wouldn't strip whitespace). > > > >> # Clears the previous output accumulated incase of match failures > $Expect_Handle->clear_accum(); > >> $Pattern_ID =3D $Expect_Handle->expect($Timeout,'-re', $Responses); > #Capture the current prompt > >> $Current_Prompt =3D $Expect_Handle->match(); > >> #Capture the output > >> $ActualOutput =3D $Expect_Handle->before().$Current_Prompt; > >> =09 > >> > > > > -- > > RGi...@cp... > > > > > > ------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, > security? Get stuff done quickly with pre-integrated technology to make > your job easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd_______________________________________________ > Expectperl-discuss mailing list > > Exp...@li... > > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > > > > !DSPAM:4448f1cd103472959816485! > > > > > > > > > > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: David B. <dbe...@an...> - 2006-04-21 23:40:38
|
I played around with this some and on my XP PRO system OS Name Microsoft Windows XP Professional Version 5.1.2600 Service Pack 2 Build 2600 With the latest cygwin (cygcheck -s) Cygwin DLL version info: DLL version: 1.5.19 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 150 Shared data: 4 DLL identifier: cygwin1 Mount registry: 2 Cygnus registry name: Cygnus Solutions Cygwin registry name: Cygwin Program options name: Program Options Cygwin mount registry name: mounts v2 Cygdrive flags: cygdrive flags Cygdrive prefix: cygdrive prefix Cygdrive default prefix: Build date: Fri Jan 20 13:28:43 EST 2006 CVS tag: cr-0x5ef Shared id: cygwin1S4 I get the same thing. Using your slightly modified code #!/usr/bin/perl use Expect; $Expect_Handle = new Expect; $Responses = "grimlock ogin: "; $Expect::Debug=1; $Result = $Expect_Handle->spawn('telnet grimlock'); $Pattern_ID = $Expect_Handle->expect($Timeout,'-re', $Responses); I get $ perl test.pl spawn id(3): beginning expect. Timeout: unlimited seconds. Current time: Fri Apr 21 12:27:47 2006 Waiting for new data (unlimited seconds)... spawn id(3): new data. spawn id(3): EOF spawn id(3): exit(0xFF00) spawn id(3): closing... Returning from expect with TIMEOUT or EOF But if I change from telnet to ssh, things seem normal $ perl test.pl spawn id(3): beginning expect. Timeout: unlimited seconds. Current time: Fri Apr 21 12:29:07 2006 Waiting for new data (unlimited seconds)... spawn id(3): new data. spawn id(3): read 52 byte(s). Enter passphrase for key '/home/myuser/.ssh/id_dsa': Waiting for new data (unlimited seconds)... Looks like telnet to me. Can you use ssh? BP Mopuri, Shailaja wrote: > Hi, > Sorry for skipping the details. What I am trying to say is, telnet is not spawned as I don't see it in the Task Manager Processes window. I don't get any errors but telnet is not invoked. I did try using > Net::Telnet but did not make any difference. As for "\n", the shell does strip the whitespace. > > Thanks for responding to my mail. > > Shailaja > > -----Original Message----- > From: Roland Giersig [mailto:RGi...@cp...] > Sent: Friday, April 21, 2006 1:38 AM > To: Mopuri, Shailaja > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] Telnet not working from Cygwin when using Expect/Perl > > Quoting "Mopuri, Shailaja" <sha...@in...>: > >> Hi, >> I am trying to invoke telnet using Expect from Perl in Cygwin. The same >> code works in Linux systems which means there is something different when invoked from Cygwin shell. Can anyone suggest any workarounds or suggestions to fix this issue. > > What are the symptoms of the failure? Any error messages? "This does not work" is not an allowed problem-description for a technician... :-) > > Alternatively you could try to use Net::Telnet to connect and pass its filehandle to exp_init, so you would avoid the cygwin shell and ptys alltogether. > >> Below is the sample code that I am trying to get it work >> >> Thanks, >> Shailaja >> >> #!/usr/bin/perl >> >> # use module >> use XML::Simple; >> use Expect; >> >> #Create the Expect handle >> $Expect_Handle =3D new Expect; >> $Cmds =3D "telnet atsism01 623"; >> $Responses =3D "server:"; >> $Result =3D $Expect_Handle->spawn($Cmds."\n"); > > Why the "\n"? This would make the last argument "623\n" (if the shell wouldn't strip whitespace). > >> # Clears the previous output accumulated incase of match failures $Expect_Handle->clear_accum(); >> $Pattern_ID =3D $Expect_Handle->expect($Timeout,'-re', $Responses); #Capture the current prompt >> $Current_Prompt =3D $Expect_Handle->match(); >> #Capture the output >> $ActualOutput =3D $Expect_Handle->before().$Current_Prompt; >> =09 >> > > -- > RGi...@cp... > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd_______________________________________________ Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > !DSPAM:4448f1cd103472959816485! > |
From: BassPlayer <bas...@an...> - 2006-04-21 19:38:46
|
I played around with this some and on my XP PRO system OS Name Microsoft Windows XP Professional Version 5.1.2600 Service Pack 2 Build 2600 With the latest cygwin (cygcheck -s) Cygwin DLL version info: DLL version: 1.5.19 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 150 Shared data: 4 DLL identifier: cygwin1 Mount registry: 2 Cygnus registry name: Cygnus Solutions Cygwin registry name: Cygwin Program options name: Program Options Cygwin mount registry name: mounts v2 Cygdrive flags: cygdrive flags Cygdrive prefix: cygdrive prefix Cygdrive default prefix: Build date: Fri Jan 20 13:28:43 EST 2006 CVS tag: cr-0x5ef Shared id: cygwin1S4 I get the same thing. Using your slightly modified code #!/usr/bin/perl use Expect; $Expect_Handle = new Expect; $Responses = "grimlock ogin: "; $Expect::Debug=1; $Result = $Expect_Handle->spawn('telnet grimlock'); $Pattern_ID = $Expect_Handle->expect($Timeout,'-re', $Responses); I get $ perl test.pl spawn id(3): beginning expect. Timeout: unlimited seconds. Current time: Fri Apr 21 12:27:47 2006 Waiting for new data (unlimited seconds)... spawn id(3): new data. spawn id(3): EOF spawn id(3): exit(0xFF00) spawn id(3): closing... Returning from expect with TIMEOUT or EOF But if I change from telnet to ssh, things seem normal $ perl test.pl spawn id(3): beginning expect. Timeout: unlimited seconds. Current time: Fri Apr 21 12:29:07 2006 Waiting for new data (unlimited seconds)... spawn id(3): new data. spawn id(3): read 52 byte(s). Enter passphrase for key '/home/myuser/.ssh/id_dsa': Waiting for new data (unlimited seconds)... Looks like telnet to me. Can you use ssh? BP Mopuri, Shailaja wrote: > Hi, > Sorry for skipping the details. What I am trying to say is, telnet is > not spawned as I don't see it in the Task Manager Processes window. I > don't get any errors but telnet is not invoked. I did try using > Net::Telnet but did not make any difference. As for "\n", the shell does > strip the whitespace. > > Thanks for responding to my mail. > > Shailaja > > -----Original Message----- > From: Roland Giersig [mailto:RGi...@cp...] > Sent: Friday, April 21, 2006 1:38 AM > To: Mopuri, Shailaja > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] Telnet not working from Cygwin when > using Expect/Perl > > Quoting "Mopuri, Shailaja" <sha...@in...>: > >> Hi, >> I am trying to invoke telnet using Expect from Perl in Cygwin. The >> same >> code works in Linux systems which means there is something different >> when invoked from Cygwin shell. Can anyone suggest any workarounds or >> suggestions to fix this issue. > > What are the symptoms of the failure? Any error messages? "This does not > work" is not an allowed problem-description for a technician... :-) > > Alternatively you could try to use Net::Telnet to connect and pass its > filehandle to exp_init, so you would avoid the cygwin shell and ptys > alltogether. > >> Below is the sample code that I am trying to get it work >> >> Thanks, >> Shailaja >> >> #!/usr/bin/perl >> >> # use module >> use XML::Simple; >> use Expect; >> >> #Create the Expect handle >> $Expect_Handle =3D new Expect; >> $Cmds =3D "telnet atsism01 623"; >> $Responses =3D "server:"; >> $Result =3D $Expect_Handle->spawn($Cmds."\n"); > > Why the "\n"? This would make the last argument "623\n" (if the shell > wouldn't strip whitespace). > >> # Clears the previous output accumulated incase of match failures >> $Expect_Handle->clear_accum(); >> $Pattern_ID =3D $Expect_Handle->expect($Timeout,'-re', $Responses); >> #Capture the current prompt >> $Current_Prompt =3D $Expect_Handle->match(); >> #Capture the output >> $ActualOutput =3D $Expect_Handle->before().$Current_Prompt; >> =09 >> > > -- > RGi...@cp... > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd_______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > !DSPAM:4448f1cd103472959816485! > |
From: Mopuri, S. <sha...@in...> - 2006-04-21 14:21:18
|
Hi, Sorry for skipping the details. What I am trying to say is, telnet is not spawned as I don't see it in the Task Manager Processes window. I don't get any errors but telnet is not invoked. I did try using Net::Telnet but did not make any difference. As for "\n", the shell does strip the whitespace.=20 Thanks for responding to my mail. Shailaja=20 -----Original Message----- From: Roland Giersig [mailto:RGi...@cp...]=20 Sent: Friday, April 21, 2006 1:38 AM To: Mopuri, Shailaja Cc: exp...@li... Subject: Re: [Expectperl-discuss] Telnet not working from Cygwin when using Expect/Perl Quoting "Mopuri, Shailaja" <sha...@in...>: > Hi, > I am trying to invoke telnet using Expect from Perl in Cygwin. The > same > code works in Linux systems which means there is something different > when invoked from Cygwin shell. Can anyone suggest any workarounds or > suggestions to fix this issue. What are the symptoms of the failure? Any error messages? "This does not work" is not an allowed problem-description for a technician... :-) Alternatively you could try to use Net::Telnet to connect and pass its filehandle to exp_init, so you would avoid the cygwin shell and ptys alltogether. > Below is the sample code that I am trying to get it work > > Thanks, > Shailaja > > #!/usr/bin/perl > > # use module > use XML::Simple; > use Expect; > > #Create the Expect handle > $Expect_Handle =3D3D new Expect; > $Cmds =3D3D "telnet atsism01 623"; > $Responses =3D3D "server:"; > $Result =3D3D $Expect_Handle->spawn($Cmds."\n"); Why the "\n"? This would make the last argument "623\n" (if the shell wouldn't strip whitespace). > # Clears the previous output accumulated incase of match failures > $Expect_Handle->clear_accum(); > $Pattern_ID =3D3D $Expect_Handle->expect($Timeout,'-re', $Responses); > #Capture the current prompt > $Current_Prompt =3D3D $Expect_Handle->match(); > #Capture the output > $ActualOutput =3D3D $Expect_Handle->before().$Current_Prompt; > =3D09 > -- RGi...@cp... |
From: Roland G. <RGi...@cp...> - 2006-04-21 08:38:43
|
Quoting "Mopuri, Shailaja" <sha...@in...>: > Hi, > I am trying to invoke telnet using Expect from Perl in Cygwin. The > same > code works in Linux systems which means there is something different > when invoked from Cygwin shell. Can anyone suggest any workarounds or > suggestions to fix this issue. What are the symptoms of the failure? Any error messages? "This does not work" is not an allowed problem-description for a technician... :-) Alternatively you could try to use Net::Telnet to connect and pass its filehandle to exp_init, so you would avoid the cygwin shell and ptys alltogether. > Below is the sample code that I am trying to get it work > > Thanks, > Shailaja > > #!/usr/bin/perl > > # use module > use XML::Simple; > use Expect; > > #Create the Expect handle > $Expect_Handle =3D new Expect; > $Cmds =3D "telnet atsism01 623"; > $Responses =3D "server:"; > $Result =3D $Expect_Handle->spawn($Cmds."\n"); Why the "\n"? This would make the last argument "623\n" (if the shell wouldn't strip whitespace). > # Clears the previous output accumulated incase of match failures > $Expect_Handle->clear_accum(); > $Pattern_ID =3D $Expect_Handle->expect($Timeout,'-re', $Responses); > #Capture the current prompt > $Current_Prompt =3D $Expect_Handle->match(); > #Capture the output > $ActualOutput =3D $Expect_Handle->before().$Current_Prompt; > =09 > -- RGi...@cp... |
From: Mopuri, S. <sha...@in...> - 2006-04-20 22:41:13
|
Hi, I am trying to invoke telnet using Expect from Perl in Cygwin. The same code works in Linux systems which means there is something different when invoked from Cygwin shell. Can anyone suggest any workarounds or suggestions to fix this issue.=20 Below is the sample code that I am trying to get it work Thanks, Shailaja #!/usr/bin/perl # use module use XML::Simple; use Expect; #Create the Expect handle $Expect_Handle =3D new Expect; $Cmds =3D "telnet atsism01 623"; $Responses =3D "server:"; $Result =3D $Expect_Handle->spawn($Cmds."\n"); # Clears the previous output accumulated incase of match failures $Expect_Handle->clear_accum(); $Pattern_ID =3D $Expect_Handle->expect($Timeout,'-re', $Responses); #Capture the current prompt $Current_Prompt =3D $Expect_Handle->match(); #Capture the output $ActualOutput =3D $Expect_Handle->before().$Current_Prompt; =09 |
From: Christoph S. <csc...@am...> - 2006-04-18 08:44:57
|
Hello Austin, first of all, thanks for your input. In Germany Friday and Monday were public holidays :)) hence I'm catching up now. exp...@li... wrote on 13-04-2006 18:33:30: > On Thu, Apr 13, 2006 at 04:59:38PM +0200, Christoph Schwaiger wrote: > > Hello, > > > > after looking some time into documentation about terminals and ttys, I'm > > still not any further. I guess I need help. > > > > In my setup I use expect to spawn shells (rsh to AIX), (ssh to Linux), to > > a lot of remote shells in parallel. So far so good, there is no problem > > with that. Only, when talking to something like 30 boxes, the connection > > closure takes a while, but OK, that's all. > > > > You could use scp/rcp to copy the files, then diff them. If you have > a bastion you can do ssh hostone 'scp hosttwo file .'; scp 'hostone file .', > or something of that nature. ssh/rsh/scp/rcp can be setup to allow automatic > login. > surely, that is possible without change to the ssh trusted environment, as I do rsh and ssh already without pw, the copy should work without change. (The setup for ssh, the /.ssh folder with the keys and authorized hosts is a bit of a pain when apache runs as nobody, as this user has no login and ~, but it works) The issue is, as I don't compare only files, but also command outputs (i.e. the content of a app shared mem segment, printed by appropriate app interface), I would need to: 1) use command to print output into a file locally, 2) copy the file over and 3) delete it there. This is possible, no doubt, but creates a new dependency a shell doesn't have: it needs a known fs (i.e. /tmp) to have free space left. Thus, I try to go for something else. > > > The thingy described before (called shiva) is called by another one called > > (egalite) to retrieve output from many hosts and compare the gathered > > files. My problem is when comparing files coming from AIX (5.2) boxes to > > files coming from Linux (suse 9.? on Itanium), that the diff doesn't match > > because TAB (x09) is translated on AIX boxes, but not on Linux. A hack > > would be to give diff the option to ignore whitespaces, but this will > > cause problems on another side, hence don't like it really. > > There is probably a setting to tell the aix tty not to do that. > `man stty` on the aix host. > alternatively you could translate the file using something like > uuencode, then decode on the local box and feed to diff. > The tty translation capabilities I checked as one of the first things, but the whole difference between them are the parameter ignpar and istrip which are deactivated on AIX, but activated on Linux (it seems like Linux uses the same settings here as "raw" on AIX). But this parameters are not related to tab translation for what I understand. All I was looking for was an obvious problem I overlooked (somebody else should have fallen over it by now), but it seems not to be the case. What I'll do then it probably letting the perl script doing the diff do some post processing to translate the tab. That seems to be at the moment the easiest thing to do. As far as I remember there is a comment saying something like at the end of character translaction lies madness - will see :) > > As I assume to talk to remote boxes of different types has probably done > > by somebody... (but if somebody has compared the output already?)... I > > hope that somebody has found a solution to this one already. That would be > > great! > > > > Otherwise, I guess a cat need to postprocess the output rather. That will > > do the trick too.. > > > > Thanks in advance. > > > > Christoph Schwaiger. > > > > PS: If somebody knows a good documentation covering the whole data path > > from the perl expect through the pseudo tty, to the process, to the > > remshell and so on...feel free to make me aware of it! > > Unix ptys are fairly widely documented, but I'm sure we could do > with a summary in the docs. > > Austin > Thanks a lot! Christoph Schwaiger > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |
From: Austin S. <te...@of...> - 2006-04-13 16:37:04
|
On Thu, Apr 13, 2006 at 04:59:38PM +0200, Christoph Schwaiger wrote: > Hello, > > after looking some time into documentation about terminals and ttys, I'm > still not any further. I guess I need help. > > In my setup I use expect to spawn shells (rsh to AIX), (ssh to Linux), to > a lot of remote shells in parallel. So far so good, there is no problem > with that. Only, when talking to something like 30 boxes, the connection > closure takes a while, but OK, that's all. > You could use scp/rcp to copy the files, then diff them. If you have a bastion you can do ssh hostone 'scp hosttwo file .'; scp 'hostone file .', or something of that nature. ssh/rsh/scp/rcp can be setup to allow automatic login. > The thingy described before (called shiva) is called by another one called > (egalite) to retrieve output from many hosts and compare the gathered > files. My problem is when comparing files coming from AIX (5.2) boxes to > files coming from Linux (suse 9.? on Itanium), that the diff doesn't match > because TAB (x09) is translated on AIX boxes, but not on Linux. A hack > would be to give diff the option to ignore whitespaces, but this will > cause problems on another side, hence don't like it really. There is probably a setting to tell the aix tty not to do that. `man stty` on the aix host. alternatively you could translate the file using something like uuencode, then decode on the local box and feed to diff. > As I assume to talk to remote boxes of different types has probably done > by somebody... (but if somebody has compared the output already?)... I > hope that somebody has found a solution to this one already. That would be > great! > > Otherwise, I guess a cat need to postprocess the output rather. That will > do the trick too.. > > Thanks in advance. > > Christoph Schwaiger. > > PS: If somebody knows a good documentation covering the whole data path > from the perl expect through the pseudo tty, to the process, to the > remshell and so on...feel free to make me aware of it! Unix ptys are fairly widely documented, but I'm sure we could do with a summary in the docs. Austin |
From: Christoph S. <csc...@am...> - 2006-04-13 14:59:52
|
Hello, after looking some time into documentation about terminals and ttys, I'm still not any further. I guess I need help. In my setup I use expect to spawn shells (rsh to AIX), (ssh to Linux), to a lot of remote shells in parallel. So far so good, there is no problem with that. Only, when talking to something like 30 boxes, the connection closure takes a while, but OK, that's all. The thingy described before (called shiva) is called by another one called (egalite) to retrieve output from many hosts and compare the gathered files. My problem is when comparing files coming from AIX (5.2) boxes to files coming from Linux (suse 9.? on Itanium), that the diff doesn't match because TAB (x09) is translated on AIX boxes, but not on Linux. A hack would be to give diff the option to ignore whitespaces, but this will cause problems on another side, hence don't like it really. I have tried the terminals (setting $ENV{'TERM'}) dumb, net and ansi, but the tab-situation is for all of them the same. I don't modify the stty settings other than to deactivate echoing (for both Lnx & AIX). As I assume to talk to remote boxes of different types has probably done by somebody... (but if somebody has compared the output already?)... I hope that somebody has found a solution to this one already. That would be great! Otherwise, I guess a cat need to postprocess the output rather. That will do the trick too.. Thanks in advance. Christoph Schwaiger. PS: If somebody knows a good documentation covering the whole data path from the perl expect through the pseudo tty, to the process, to the remshell and so on...feel free to make me aware of it! |
From: Ed S. <got...@gm...> - 2006-04-11 20:17:30
|
Hello all, I have a perl script using Expect, called by a shell script (which spawns the perl script endlessly), the shell script launched by cron.=20 This is on Solaris 9. The output that my perl script is getting via expect is chopped off at 80 characters. I tried doing : system("stty columns 512"); then $sqsh->slave->clone_winsize_from(\*STDIN); before doing the spawn, but this doesn't do anything. I'm not clear on how I can pass a 'window' size in to Expect in a background script. Any thoughts? -- Back to the Earth I screamed, and no one listened. Back to the Earth I lived, and they all followed. |
From: Bryan B. <br...@bu...> - 2006-04-01 14:50:40
|
> I am using Perl to create a back-end for a browser-based interface > i am using the system(" ") statement to execute shell commands. > > i want to use Expect to automate 'su', and so that i can then execute > root-level commands from the browser itself. > You should really use sudo, you can still take advantage of Expect, but with sudo you lock down what can and cannot be ran as the web user (nobody, or apache) and you can do it without having a password stored somewhere in plain text. > is it possible to do that using Expect, or are any other additional > modules > required? > You should make sure Bundle::Expect is up to date, otherwise that should be all you need. > Thanks. > Bryan http://sourceforge.net/projects/rover |
From: Jithamithra G. <gt....@gm...> - 2006-04-01 13:08:45
|
---------- Forwarded message ---------- From: Jithamithra Govindarajan <gt....@gm...> Date: Apr 1, 2006 8:13 AM Subject: Expect using CGI To: exp...@li... I am using Perl to create a back-end for a browser-based interface i am using the system(" ") statement to execute shell commands. i want to use Expect to automate 'su', and so that i can then execute root-level commands from the browser itself. is it possible to do that using Expect, or are any other additional modules required? Thanks. |
From: Jithamithra G. <gt....@gm...> - 2006-04-01 02:43:53
|
I am using Perl to create a back-end for a browser-based interface i am using the system(" ") statement to execute shell commands. i want to use Expect to automate 'su', and so that i can then execute root-level commands from the browser itself. is it possible to do that using Expect, or are any other additional modules required? Thanks. |
From: Jo R. <jr...@sv...> - 2006-03-28 07:47:21
|
> also forces any identifier to the left of it to be interpreted as a string." Yes. The wonders of Perl. Your code will do something you never dreamed of in the next version of Perl to ship ;-) People wonder why I obsessively quote and use explicit syntax for things which work unquoted and without operations, and this is why. A compiler that makes a best guess as to what I mean is a bad thing. -- Jo Rhett senior geek SVcolo : Silicon Valley Colocation |
From: BassPlayer <bas...@an...> - 2006-03-22 14:22:39
|
Also www.freshmeat.net is a good site. BP Bryan Bueter wrote: > >> Hey guys, >> I'm a bit of a perl newby, just trying to get a script up that I >> can use to log into devices using ssh, just wondering if there are >> any good repositories of scrips of if anyone has some good sample >> scripts I could use to help me along. I have read the perl::Expect >> docs, still a bit confused about the implementation. >> >> Cheers >> Dave >> > > I also maintain a project around Expect you can use without having to > program in perl. If your interested e-mail me directly and I can get you > a copy of the beta graphical tool I. > > Also you can check out the sourceforge link in my sig. > > > Bryan > http://sourceforge.net/projects/rover > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > !DSPAM:442156fc15601227882105! > |
From: Bryan B. <br...@bu...> - 2006-03-22 13:27:35
|
> Hey guys, > I'm a bit of a perl newby, just trying to get a script up that I > can use to log into devices using ssh, just wondering if there are > any good repositories of scrips of if anyone has some good sample > scripts I could use to help me along. I have read the perl::Expect > docs, still a bit confused about the implementation. > > Cheers > Dave > I also maintain a project around Expect you can use without having to program in perl. If your interested e-mail me directly and I can get you a copy of the beta graphical tool I. Also you can check out the sourceforge link in my sig. Bryan http://sourceforge.net/projects/rover |
From: David T. <dav...@ro...> - 2006-03-22 11:56:18
|
Austin, I'm learning Perl anyway, just not far along the process, so I'd prefer to get that going than learn a few languages. -----Original Message----- From: Austin Schutz [mailto:te...@of...]=20 Sent: Wednesday, 22 March 2006 8:22 PM To: David Taylor Cc: exp...@li... Subject: Re: [Expectperl-discuss] Logging into routers using ssh On Wed, Mar 15, 2006 at 02:15:35PM +1100, David Taylor wrote: > Hey guys, > I'm a bit of a perl newby, just trying to get a script up that > I can use to log into devices using ssh, just wondering if there are=20 > any good repositories of scrips of if anyone has some good sample=20 > scripts I could use to help me along. I have read the perl::Expect=20 > docs, still a bit confused about the implementation. The login scripts that come with rancid (http://www.shrubbery.net/rancid/) may work better for you than trying to learn a new language, unless you are doing compled customization. Trying to learn perl by working your way through the Expect docs is probably not the best way to get an introduction to the language. Austin |
From: Austin S. <te...@of...> - 2006-03-22 09:22:46
|
On Wed, Mar 15, 2006 at 02:15:35PM +1100, David Taylor wrote: > Hey guys, > I'm a bit of a perl newby, just trying to get a script up that I can use to log into devices using ssh, just wondering if there are any good repositories of scrips of if anyone has some good sample scripts I could use to help me along. I have read the perl::Expect docs, still a bit confused about the implementation. The login scripts that come with rancid (http://www.shrubbery.net/rancid/) may work better for you than trying to learn a new language, unless you are doing compled customization. Trying to learn perl by working your way through the Expect docs is probably not the best way to get an introduction to the language. Austin |
From: Kai H. <kai...@al...> - 2006-03-16 22:39:40
|
=20 <scratch head> I thought =3D> was a synonym for a comma. Your example = shows them to be different. <shrug> Might as well try it. <clickety> = There, quotes around 'eof'....=20 Hey! It works! <Thump of Programming Perl hitting the desk> <page flip> Operators.... = <pages flip> ... Comma Operators.... "The =3D> diagraph ... also forces = any identifier to the left of it to be interpreted as a string." Aah.... <chuckle> Light dawns. Thank you Joao, you are exactly correct. - Kai > -----Original Message----- > From: Joao Lopes [mailto:dev...@st...]=20 > Sent: Thursday, March 16, 2006 1:58 PM > To: Kai Hintze > Cc: exp...@li... > Subject: Re: [Expectperl-discuss] eof becomes 1 >=20 > I'm not the expert here but... I think you=B4re getting the function=20 > "eof()" instead of the literal 'eof' (special sequence for Expect)... > Try: > [ 'eof', sub { ... } ], > Or > [ eof =3D> sub { ... } ], >=20 > -- > Joao Lopes >=20 > >=20 > >If I've sent this multiple times I apologize, but I keep getting a > >response from postmaster that it was rejected.... > > > >Greetings Oh Expectators! > >=20 > >I've tracked down my unexpected end to the correct stanza=20 > and immediate > >cause. Now I need some help getting around it. > >=20 > >I have a fairly lengthy expect statement with this stanza at the end: > > [ eof, > > sub { > > print "\n\nExpect EOF: Unexpected end of $spawn_method > >session.\n\n"; > > sleep 2; > > } > > ], > > </quote> > >=20 > >This stanza gets translated to this phrase when the program runs > >(exp_internal(1)): > > #9: -re `1' > ></quote> > >=20 > >The literal '1' matches any random 1 that comes through, making the > >program think it has found an EOF. How do I get around this? > >=20 > >I suppose that I could not test for EOF, but I would like to=20 > know if the > >spawned program died out from under me. How are other people handling > >this? Or is my syntax wrong? > >=20 > >Expect 1.15 under perl 5.8.0 on linux. > >=20 > >Thanks, > >Kai > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by xPML, a groundbreaking=20 > scripting language > >that extends applications into web and mobile media. Attend=20 > the live webcast > >and join the prime developer group breaking into this new=20 > coding territory! > = >http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=110944&bid$1720&dat=121642 > >_______________________________________________ > >Expectperl-discuss mailing list > >Exp...@li... > >https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > > > > =20 > > >=20 >=20 |
From: Joao L. <dev...@st...> - 2006-03-16 20:58:31
|
I'm not the expert here but... I think you´re getting the function "eof()" instead of the literal 'eof' (special sequence for Expect)... Try: [ 'eof', sub { ... } ], Or [ eof => sub { ... } ], -- Joao Lopes > >If I've sent this multiple times I apologize, but I keep getting a >response from postmaster that it was rejected.... > >Greetings Oh Expectators! > >I've tracked down my unexpected end to the correct stanza and immediate >cause. Now I need some help getting around it. > >I have a fairly lengthy expect statement with this stanza at the end: > [ eof, > sub { > print "\n\nExpect EOF: Unexpected end of $spawn_method >session.\n\n"; > sleep 2; > } > ], > </quote> > >This stanza gets translated to this phrase when the program runs >(exp_internal(1)): > #9: -re `1' ></quote> > >The literal '1' matches any random 1 that comes through, making the >program think it has found an EOF. How do I get around this? > >I suppose that I could not test for EOF, but I would like to know if the >spawned program died out from under me. How are other people handling >this? Or is my syntax wrong? > >Expect 1.15 under perl 5.8.0 on linux. > >Thanks, >Kai > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 >_______________________________________________ >Expectperl-discuss mailing list >Exp...@li... >https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > > > |
From: Kai H. <kai...@al...> - 2006-03-16 18:10:34
|
=20 If I've sent this multiple times I apologize, but I keep getting a response from postmaster that it was rejected.... Greetings Oh Expectators! =20 I've tracked down my unexpected end to the correct stanza and immediate cause. Now I need some help getting around it. =20 I have a fairly lengthy expect statement with this stanza at the end: [ eof, sub { print "\n\nExpect EOF: Unexpected end of $spawn_method session.\n\n"; sleep 2; } ], </quote> =20 This stanza gets translated to this phrase when the program runs (exp_internal(1)): #9: -re `1' </quote> =20 The literal '1' matches any random 1 that comes through, making the program think it has found an EOF. How do I get around this? =20 I suppose that I could not test for EOF, but I would like to know if the spawned program died out from under me. How are other people handling this? Or is my syntax wrong? =20 Expect 1.15 under perl 5.8.0 on linux. =20 Thanks, Kai |
From: David T. <dav...@ro...> - 2006-03-15 03:07:18
|
Hey guys, I'm a bit of a perl newby, just trying to get a script up that I = can use to log into devices using ssh, just wondering if there are any = good repositories of scrips of if anyone has some good sample scripts I = could use to help me along. I have read the perl::Expect docs, still a = bit confused about the implementation. Cheers Dave=20 |
From: Jo R. <jr...@sv...> - 2006-03-13 20:32:33
|
On Fri, Mar 10, 2006 at 02:37:36PM +0100, Roland Giersig wrote: > Expect collects all output into a buffer (the accumulator) and matches > against that. This is the mindset you should program in: you have a > string with multiple lines in it. > > So here are a few rules: > > To match a line, use "^.*\n". Note that "." will not match a newline > until you use single-line matching (the option or "(?s)"). My syntax reading fouled up, and I'm confused. "the option" is what? And what did you mean by "(?s)" My first read was using ? for smallest match (ie "(.*?)\n"), but now I'm not so sure. > Note that "\s" WILL match a newline, so it gives unexpected results with > empty lines (as you have already found out). Use "[ \t]" instead. > > To match against the end of buffer (which IMHO is a bad idea), use "\z". > > Don't use "$" or "\Z", instead always anchor your patterns at the start > of the line. Anchoring at the start of the line is fine, but how to properly detect the end of the line is the question. Lines where I know the start but don't know the end (and thus need to find and output the lines) is the issue. /^[ \t]+Line starts with(.*?)[\r\n]+/ ..doesn't seem to work /^[ \t]+Line starts with(.*?)$/ .. does work, but can also match a partial line in the accumulator. /^[ \t]+Line starts with(.*?)\r+$/ .. does work In short, I'm not convinced that \n is actually matching right now. And this all makes sense, but goes explicitly against the documentation that says that line-matching can be done with ^ and $. It seems likely that the documentation is out of date, but... -- Jo Rhett senior geek SVcolo : Silicon Valley Colocation |