invoking write from cron

Andrew Klossner andrew at frip.wv.tek.com
Wed Apr 26 02:29:47 AEST 1989


[]

	"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 at relay.cs.net)   [ARPA]



More information about the Comp.unix.wizards mailing list