Biff and mesg differ in usage of stdout/stderr.
roy at phri.UUCP
roy at phri.UUCP
Fri Jan 24 06:01:01 AEST 1986
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 <allegra!phri!roy>
System Administrator, Public Health Research Institute
455 First Avenue, New York, NY 10016
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list