LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 03-24-2006, 08:17 AM   #1
kshkid
Member
 
Registered: Dec 2005
Distribution: RHEL3, FC3
Posts: 383

Rep: Reputation: 30
simulating pseudo master-slave terminal sytem


Hi All,

I am developing a program using the concept of pseudo master-slave terminal system to track the commands typed and the output.

I had been really successfull in implementing that.
The part that I find very difficult to analyze is the control characters that are produced as output.

like,
when i execute the command clear
in the prompt
i get a log of the command as clear
^[[v^[[H

and many control characters if I run cursor based programs

I would like to log only the characters without any control characters.
How to identify the pattern of control characters ?

Any help would be greatly appreciated ?

Thanks a lot for your help !!!
 
Old 03-24-2006, 10:34 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 9,920

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
At first glance these appear to be vt100 terminal Escape control sequences.
You will need a hex dump of the file to confirm.

^[[H could be the sequence Esc [ H which moves the cursor to the home position.

http://astronomy.swin.edu.au/~pbourk...formats/vt100/
 
Old 03-27-2006, 07:58 AM   #3
kshkid
Member
 
Registered: Dec 2005
Distribution: RHEL3, FC3
Posts: 383

Original Poster
Rep: Reputation: 30
thanks for the reply,

yes they are control sequences,
(using netterm, putty to connect to the server SunOS)

now how do I identify these patterns so that i can remove all of such sequences in the log file ?

Patterns are so different,
If I consider cursor programs that are running.
 
  


Reply


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 Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Switch to pseudo terminal you didn't log out of? xnomad Linux - General 2 07-19-2005 12:35 AM
Questions about (Pseudo)Terminal devices beginner16 Programming 0 04-09-2004 10:03 AM
Slave to Master? s9722 Linux - General 6 02-23-2004 10:34 PM
Pseudo Terminal Problems ailiez Programming 2 02-09-2004 01:58 AM
Slave to Master Question tkman Linux - General 2 11-23-2003 11:37 PM


All times are GMT -5. The time now is 05:23 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration