using 'printf' in a script in terminal window

Ambrose LI ambrose.li at gmail.com
Sat Nov 21 20:51:14 CET 2009


2009/11/21 Yves-Alexis Perez <corsac at debian.org>:
> On sam., 2009-11-21 at 12:14 -0500, Jerry wrote:
>> This would appear to be a "by design" feature; although I cannot fathom
>> why. Using 'clear' is fine as long as the script is not used via CRON.
>> 'Clear' produces strange output with scripts run via CRON. I know that
>> there are ways to program around that; however, it does complicate
>> things. I prefer the "KISS" approach.
>
> Maybe because it doesn't make sense to clear the screen when running not
> interactively. I'd add there's no such things as screen, in that case.

No, this sounds more like cron is not providing a correct $TERM (which
should be "dumb" or similar for non-interactive jobs) to its children.
Maybe setting TERM=dumb in the crontab (if possible) can fix this, or
maybe running the particular cron job prefixed by TERM=dumb to force
the correct terminal type.


-- 
cheers,
-ambrose



More information about the Xfce mailing list