return code from host command
Smith, Earl (Exchange)
emsmith at Bear.com
Tue Aug 30 14:51:21 UTC 2005
-- Attached file included as plaintext by Ecartis --
When I do a host command on a remote machine (not the DNS server), host
gives me a return code of 0 even when the machine is not found. When I
do the identical command on the DNS server I get the same answer, but
the return code is 1, which is what I would have expected. Why?
NOT ON THE DNS SERVER
$ /opt/ISCbind/bin/host 165.168.235.199 pwdnsrev1.is.bear.com
Using domain server:
Name: pwdnsrev1.is.bear.com
Address: 147.107.87.3#53
Aliases:
Host 199.235.168.165.in-addr.arpa not found: 3(NXDOMAIN)
$ echo $?
0
$ echo $SHELL
/bin/ksh
$
ON THE DNS SERVER
pwdnsrev1# /opt/ISCbind/bin/host 165.168.235.199 pwdnsrev1.is.bear.com
Using domain server:
Name: pwdnsrev1.is.bear.com
Address: 147.107.87.3#53
Aliases:
Host 199.235.168.165.in-addr.arpa not found: 3(NXDOMAIN)
pwdnsrev1# echo $?
1
pwdnsrev1# echo $SHELL
/bin/ksh
pwdnsrev1#
Earl M. Smith
emsmith at bear.com
beeper 917-401-0087
cell 201-390-6893
desk 212-272-1502 (not often there)
-- Attached file included as plaintext by Ecartis --
-- File: Disclaimer
**********************************************************************
Please be aware that, notwithstanding the fact that the person sending
this communication has an address in Bear Stearns' e-mail system, this
person is not an employee, agent or representative of Bear Stearns.
Accordingly, this person has no power or authority to represent, make
any recommendation, solicitation, offer or statements or disclose
information on behalf of or in any way bind Bear Stearns or any of its
affiliates.
**********************************************************************
More information about the bind-users
mailing list