Re: Check return value of scp

From: Kimmo Koivisto (kimmo.koivisto_at_surfeu.fi)
Date: 01/30/05

  • Next message: all mail refused: "Re: Check return value of scp"
    Date: Sun, 30 Jan 2005 20:22:27 +0200
    
    

    h.wulff wrote:

    > Hello,
    >
    > I have a script that copies data and on successful copying it burns the
    > data.
    > How can I check whether the connection was established and all the data
    > were successful copied?

    Check $? after scp:

    scp data user@server:/directory
    if ! test $? -eq 0; then
    something
    else
    something
    fi

    Regards
    Kimmo


  • Next message: all mail refused: "Re: Check return value of scp"