Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > NET::Telnet prompt regular expression

Thread Tools

NET::Telnet prompt regular expression

Pete Johansen
Posts: n/a
Hi Folks,

This prompt statement has been a real pain in the the butt. I am
using net::telnet(v3.03) to connect to a W2K box from a Solaris 2.6
box. I the output stream resulting from a 'dir' command I am getting
control characters and a line-feed. Here is an example from the
04/29/04 08:44p 157,120 ch_r8_ops_inventory_w2k.lst
04/29/04 08:47p 157,120 ch_r8_sup_inventory_w2k.lst
04/30/04 09:49p 154,007 ch_r9_ops_inventory_w2k.lst
04/30/04 09:52p 154,007 ch_r9_sup_inventory_w2k.lst
8 File(s) 1,158,580 bytes
11,800,805,376 bytes free


Any Ideas on how to construct a $tn->prompt() statement to handle it?
It seems to only way to get the line-feed is to use "(dbl-quotes), but
the docs say to use '(single quotes). BTW, the ctrl characters are
not always consistant, but at least the form is the same ^[[99;9H

I can get the listing using 'ls -l' (without the funky
cntl-characters), but would like to use 'dir' so I don't have do a
bunch of extra processing to convert the date for newer files(< 6
months old).

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
prompt to save on exit - disable prompt on save button Mel ASP .Net 10 02-13-2009 05:32 AM
How to open a shell prompt from an existing shell prompt gaurav kashyap Python 3 10-31-2008 04:41 AM
How to open a shell prompt from an existing shell prompt gaurav kashyap Python 2 10-30-2008 09:18 AM
Matching abitrary expression in a regular expression =?iso-8859-1?B?bW9vcJk=?= Java 8 12-02-2005 12:51 AM
Dynamically changing the regular expression of Regular Expression validator VSK ASP .Net 2 08-24-2003 02:47 PM