Solved

Need to remove curses markup

Posted on 2011-03-03
2
378 Views
Last Modified: 2012-05-11
I have the need to telnet (programatically) and scrape output off the screen (stdout) from certain commands.  Problem is as I am running this on my windows machine at least (have not tested on Linux) I get a lot of weird curses markup which I would like to filter out.  It looks something like this on the windows command prompt when I run the app.  Intermixed in there I have identified as the stuff I want with 'value i want'.  Is there some way to get rid of this markup and have it display properly?


Thanks,


¿>¿[?3l¿[?4l¿[?5l¿[m¿[?7h¿[?8h¿(B¿)0¿[1;1H
                                          ¿[2;1H
                                                ¿[3;1H
                                                      ¿[4;1H
                                                            ¿[5;1H
                                                                  ¿[6;1H
                                                                        ¿[7;1H
                                                                              ¿[
8;1H
    ¿[9;1H
          ¿[10;1H
                 ¿[11;1H
                        ¿[12;1H
                               ¿[13;1H
                                      ¿[14;1H
                                             ¿[15;1H
                                                    ¿[16;1H
                                                           ¿[17;1H
                                                                  ¿[18;1H
                                                                         ¿[19;1H

¿[20;1H
       ¿[21;1H
              ¿[22;1H
                     ¿[23;1H
                            ¿[24;1H
                                  ¿[1;1Hvalue I want¿[2;value I want
¿[3;1Hvalue I want¿[4;1Hvalue I want¿[6;1Hvalue I want¿[7;1HValue I want¿[

Open in new window

0
Comment
Question by:Mr_Oz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 35029399

How are you using telnet programmatically?
I'd think that some abailable Java telnet client libraries
(e.g. like http://javassh.org/space/start)
 should take care of this extra symbols and present you with the valuable
data only. Isn't it the case?
0
 
LVL 1

Author Comment

by:Mr_Oz
ID: 35029615
I think that may work better than what I am doing as it includes a terminal.  I will give it a a try thanks.

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question