"Anthony E. Greene" wrote:
> I have a small script that runs rdate and reports success or failure:
>
> #!/bin/bash
> if rdate -s timeserver; then
> echo Success
> else
> echo Failure
> fi
>
> If the network connectivity is down between my box and the time server,
> rdate reports an error (as it should) but the script still reports
> success. What am I doing wrong?
the following should work:
#!/bin/bash
if [ `rdate -s timeserver` ] ; then # make sure these are backquotes
echo Success
else
echo Failure
fi
Bret
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.