Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!ut-sally!pyramid!pesnta!phri!roy From: roy@phri.UUCP Newsgroups: net.bugs.4bsd Subject: Biff and mesg differ in usage of stdout/stderr. Message-ID: <2154@phri.UUCP> Date: Thu, 23-Jan-86 15:01:01 EST Article-I.D.: phri.2154 Posted: Thu Jan 23 15:01:01 1986 Date-Received: Sat, 25-Jan-86 08:49:28 EST Distribution: net Organization: Public Health Research Inst. (NY, NY) Lines: 22 Index: ucb/biff.c, usr.bin/mesg.c 4.2BSD Description: Biff produces its output to stdout, mesg uses stderr. It's not clear which is "correct", but they should be the same. In a shell script I wanted to turn off messages and then restore to the original state by doing b=`biff | sed s/is//`; COMMANDS; biff $b, and similarly for mesg. To loose the "is y" and "is n" messages, I redirected biff/mesg into /dev/null, and thus discovered the disparity. Repeat-By: Try the following: biff; biff > /dev/null; biff >& /dev/null mesg; mesg > /dev/null; mesg >& /dev/null Fix: It's so obvious it hardly requires mentioning. Either change the "printf"'s in biff or the "fprintf (stderr"'s in mesg to match the other program. -- Roy Smith System Administrator, Public Health Research Institute 455 First Avenue, New York, NY 10016