You're right.  Although, I believe Kent probably meant to use ||.

ntpdate time.nist.gov || echo "Damn this piece of..."


On Mon, 13 Nov 2000 dopp at acm.cs.umn.edu wrote:

> On Mon, Nov 13, 2000 at 11:46:17AM -0600, Kent Schumacher wrote:
> > I typically string 3 or four servers coupled by &&'s in case one of
> > the servers is down.  For example...
> > 
> > ntpdate time.nist.gov && ntpdate for.a.good.time.call.gov && ntpdate time.enough.org
> > 
> I don't think this makes any sense.  The second expression only procedes if
> the first expression returns true.  So, in order for this entire expression
> to finish, each one of the sub-expressions must exit normally.  So, you're
> just setting your time 3 times and if first expression fails, your
> time doesn't get set at all.  
> 
> Or, I could be completely wrong about the behavior of &&.  It seems to me
> that you'd want to be using some sort of logical OR here (maybe ||, but
> I'm not sure if that's a valid operator in shell).
> 
---------------------------------------------------------------------
Timothy Houck
thouck at thouck.com
www.thouck.com