Cron, /etc/motd & cronlog (SV)

Robert N. Berlinger naftoli at aecom.UUCP
Tue Jul 2 01:32:12 AEST 1985


> > The message of the day ("/etc/motd") is printed in the cronlog file every
> > time an "su - user -c command" is executed by cron.  Does anyone know how
> > to supress the "printing" of /etc/motd when using the "-" option to su?
> > It would make the cronlog smaller and more easily read.  We use Uniplus+
> > System V.

Change the line that says 'cat /etc/motd' to:

if [ -t ]
then cat /etc/motd
fi

The cat will only execute if the standard output is a terminal.
-- 
Robert Berlinger
...{philabs,cucard,pegasus,ihnp4,rocky2}!aecom!naftoli



More information about the Comp.unix.wizards mailing list