Connecting Tech Pros Worldwide Help | Site Map

NET::Telnet prompt regular expression

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 19th, 2005, 05:04 AM
Pete Johansen
Guest
 
Posts: n/a
Default NET::Telnet prompt regular expression

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
input_log:
..
..
..
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

Z:\>^[[24;1H
^[[23;5H

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).

Thanks,
Pete

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.