[97502] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: strange characters killing terminal

daemon@ATHENA.MIT.EDU (John H Darrah)
Tue Nov 3 13:10:27 1998

Date: Tue, 3 Nov 1998 10:01:13 -0800 (PST)
From: John H Darrah <jhd@giddens.com>
To: redhat-list@redhat.com
In-Reply-To: <363F1A06.676EA30F@twopoint.com>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

On Tue, 3 Nov 1998, Michael Jinks wrote:


> I'm using a Redhat 5.1 box to capture report
> printouts from a legacy system over its serial
> port.  So far everything has gone fine, but the
> report we're printing now seems to have lots of
> characters in it that my terminal sessions don't
> like.  If I try to "tail" or "head" the file, I
> get a dash and one of those solid rectangle
> characters, and my login hangs and must be
> killed; can't even send a break. 

Try the following script to strip all control
characters (except TAB) from the input. Change the
baud rate to match what you are using.

Also change "some.file" and "/dev/ttyname" to
whatever you are using.


--CUT---

#!/bin/sh  

(
    stty 9600 raw istrip icanon

    tr -d '\000-\010' |
    tr -d '\012-\037' > some.file

) < /dev/ttyname

--CUT--


--
John Darrah (u05192)	| Dept: N/C Programming
Giddens Industries	| Ph: (425) 353-0405 #229
PO box 3190		| Ph: (206) 767-4212 #229
Everett  WA    98203	| Fx: (206) 764-9639


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post