[8461] in Athena Bugs
vax 7.3P: hesinfo
daemon@ATHENA.MIT.EDU (Mark Rosenstein)
Wed Oct 23 10:15:55 1991
Date: Wed, 23 Oct 91 10:16:51 -0400
From: Mark Rosenstein <mar@MIT.EDU>
To: drmorris@Athena.MIT.EDU
Cc: bugs@MIT.EDU
In-Reply-To: [8460]
The change was made for a specific reason: with the old behavior, you
couldn't tell the difference between (1) the name doesn't exist, and
(2) the name exists and has an empty string as it's data. The second
case is a rare but not impossible occurance.
In any case, this behavior shouldn't cause trouble when using hesinfo
to determine if an entry exists. Nothing will be printed to stdout;
the error goes to stderr. So it is sufficient to make sure the output
is empty, and redirect stderr to /dev/null if you want to. In a sh script:
hesinfo name type > /tmp/hes$$ 2> /dev/null
if [ -s /tmp/hes$$ ] then
...
fi
rm -f /tmp/hes$$
I hope this is helpful.
-Mark