Re: Expect and backspace characters
From: Cameron Laird (claird_at_lairds.com)
Date: Fri, 26 Dec 2003 18:49:21 -0000
In article <firstname.lastname@example.org>,
Frost <email@example.com> wrote:
>I have an Expect script running from the Cron, and have found that the
>output of the script is full of backspace characters (^h), which make
>it somewhat difficult to read in my email client.
>I am using "spawn -noecho" when I launch a shell. However, the output
>I receive looks like this:
>bash-2.05b$ CVSROOT='/data1/cvsroot' /usr/bin/cvs -q up -d
></cvsroot' /usr/bin/cvs -q up -d /home/user/coder
>Anybody have an idea of how to preserve the normal script output but
>filter out the local echo and / or the backspace characters that are
>being output to Cron?
It sounds as though you're saying you want "the normal
script output" when run under some circumstances, rather
than the output you observe when running as cron. While
there are a number of ways to approach this, I'd invest-
igate how to make cron processes behave as "normal" ones.
It's likely you just need to set the TERM environment
variable or some other one-liner.
Expect FAQs frequently involve cron.
-- Cameron Laird <firstname.lastname@example.org> Business: http://www.Phaseit.net