NET::Telnet prompt regular expression

P

Pete Johansen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top