Non-printable characters

Non-printable characters

Post by James Whitl » Tue, 30 Dec 1997 04:00:00



Can someone supply me with a good routine or idea on how to eliminate
non-printable characters out of a string that are produced when the user
uses the arrow keys to edit his entry when data is being requested by the
read command?
--

...SPAM problems? Visit: http://www.whiteice.com

 
 
 

Non-printable characters

Post by Charles Dem » Tue, 30 Dec 1997 04:00:00




>Can someone supply me with a good routine or idea on how to eliminate
>non-printable characters out of a string that are produced when the user
>uses the arrow keys to edit his entry when data is being requested by the
>read command?

Use the Unix tr command with the -d option to translate/delete the
undesired characters in the file.  See man tr, it is slightly system
dependent in it's format.  Non printable characters are specified
as octal numbers, e.g. \015 for <CR>

Chuck Demas
Needham, Mass.

--
  Eat Healthy    |   _ _   | Nothing would be done at all,

  Die Anyway     |    v    | That no one could find fault with it.