Re: Check return value of scp
From: Kimmo Koivisto (kimmo.koivisto_at_surfeu.fi)
Date: 01/30/05
- Previous message: Nico Kadel-Garcia: "Re: can't prevent root lockout under Tru64/C2 security"
- In reply to: h.wulff: "Check return value of scp"
- Next in thread: all mail refused: "Re: Check return value of scp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- Previous message: Nico Kadel-Garcia: "Re: can't prevent root lockout under Tru64/C2 security"
- In reply to: h.wulff: "Check return value of scp"
- Next in thread: all mail refused: "Re: Check return value of scp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]