[EMAIL PROTECTED] wrote:
> 
> Hello,
> 
> I need a hand with scripting... ive got a script that 'want' to update cvs 
> things. But sometimes i get messages like:
> "cvs [update aborted]: connect to anoncvs.gnome.org:2401 failed: Connection 
> refused"....
> 
> The script goes on ignoring the message and it think, it has update the 
> module... How can i make it more intelligent trying again when this message 
> apear?
> 
> Thanks,
Try testing the special bash variable $?. quote from man bash :

      $?      Expands to the status of the most recently executed
              foreground pipeline.

so either you test this value explicitly:  
  cvs something;
  if test "$?" ; then  
        echo "darn" ; 
  fi 
or you use it implicitly 
  cvs something || 
  echo darn

hope this helps

mfg

-------------------------------------------------------
Andreas Sliwka --- http://emil.nef.wh.uni-dortmund.de/~goff
talk to me: [EMAIL PROTECTED]/ICQ:13961062

Reply via email to