[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: printout sending control codes to the console?



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?

Pipe it through cat -vet?

(Strictly, only cat -v is needed. -e adds a $ at the end of each line
and -t prints tabs as ^I. And if you have -e, you don’t need -v for Gnu
cat. This isn’t true with other cats, and “cat -vet” is easy to
remember!)

James

-- 
E-mail:     james@ |     “Why is it we never meet anyone nice?”
aprilcottage.co.uk |     “Why is it we never meet anyone who can shoot
                   | straight?”
                   |     -- Lister and Cat, ‘Red Dwarf’


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]