> >  if [ ~`hostname` = ~6M ];then;NM=tomsrtbt;else;NM=`hostname`-tomsrtbt;fi
> >
> >Um, it looks like bash doesn't allow you do do if/then/else all on the 
> >same line...
> 
> It works, if you remove 2 semicolons:
> 
> if [ ~`hostname` = ~6M ];then NM=tomsrtbt;else NM=`hostname`-tomsrtbt;fi
> 
> Syntax for if/then/else from the bash manual:

But, with bash it works to say:

if ...
then
  ...
else
  ...
fi

so it *should* work to have the semicolons, as well.  Semicolons should
ALWAYS be equivalent to newlines, shouldn't they?  Anyway, I'll take them
out.

-TomA


Reply via email to