printout sending control codes to the console?

Jerry Feldman gaf at blu.org
Wed Feb 25 12:46:51 UTC 2009


On 02/24/2009 07:53 PM, Konstantin Svist wrote:
> I have a script which prints out some data to the terminal, which I keep
> in a screen session.
> Often times I see indecipherable characters printed out and the output
> freezes - I'm guessing some control code is being triggered from the
> printout.
> Is there a way to prevent this?
>
>
>   
ASCII contains a number of control codes. One of these is XOFF (stop 
output or control-S) and another is XON (resume output or control Q). 
Basically the C function isprint(3) tests if a character is printable 
(in C). I'm sure there are similar functions available to Perl and other 
scripting languages. Or you can simply test the value of a character. If 
it is < 0x20 it is a control character.

-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20090225/53cf2e5c/attachment-0001.sig>


More information about the fedora-list mailing list