Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need to remove curses markup

Posted on 2011-03-03
2
Medium Priority
?
382 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

618 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