Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!tektronix!orca!tekecs!frip!andrew From: andrew@frip.wv.tek.com (Andrew Klossner) Newsgroups: comp.unix.wizards Subject: Re: invoking write from cron Message-ID: <11331@tekecs.GWD.TEK.COM> Date: 25 Apr 89 16:29:47 GMT References: <175@dftsrv.gsfc.nasa.gov> <8594@xanth.cs.odu.edu> <2505@mentor.cc.purdue.edu> Sender: andrew@tekecs.GWD.TEK.COM Distribution: usa Organization: Tektronix, Wilsonville, Oregon Lines: 15 [] "4.3BSD write(1) exits with a fatal error if it cannot find out what terminal the writer is logged on to. So, write isn't going to work under 4.3BSD if run from inside cron. It's relatively simple to write a shell script version of write using echo, who, and awk that doesn't depend on a controlling tty." It's even easier just to supply a controlling tty: echo "message to send" | write userid 2>/dev/console -=- Andrew Klossner (uunet!tektronix!orca!frip!andrew) [UUCP] (andrew%frip.wv.tek.com@relay.cs.net) [ARPA]