Check return value of scp

From: h.wulff (zuhause_at_aol.com)
Date: 01/30/05

  • Next message: Nico Kadel-Garcia: "Re: can't prevent root lockout under Tru64/C2 security"
    Date: Sun, 30 Jan 2005 10:54:03 +0100
    
    

    Hello,

    I have a script that copies data and on successful copying it burns the
    data.
    My return value check looks like this:

    if ( ! scp <options> )
    then
        ...
        exit 1
    fi

    But unfortunately it returns everything ok when the connection fails and
    no data was copied.
    I use scp that comes with this version:
    OpenSSH_3.4p1 Debian 1:3.4p1-1.woody.3, SSH protocols 1.5/2.0, OpenSSL
    0x0090603f

    How can I check whether the connection was established and all the data
    were successful copied?

    Thank you for your efforts!

    -- 
    	h.wulff
    	   [dont send me an email]
    

  • Next message: Nico Kadel-Garcia: "Re: can't prevent root lockout under Tru64/C2 security"