Re: how to test for return code?
From: Bill Marcum (bmarcum_at_iglou.com)
Date: 10/04/03
- Next message: Mark Blain: "Re: Where can I get the source code for the Bourne Shell?"
- Previous message: Alan Connor: "Re: how to test for return code?"
- In reply to: Jane: "how to test for return code?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 3 Oct 2003 18:00:57 -0400
On Fri, 03 Oct 2003 20:55:21 GMT, Jane
<Jane@dossss.com> wrote:
> My script has
> ...
> echo "get *.zip" | sftp userid@passwd >> ftplog
> ...
>
> How do I test if the sftp succeeded?
>
> I tried
> ...
> IS_ERR = `echo "get *.zip" | sftp userid@passwd >> ftplog`
> echo $IS_ERR
> ....
>
Don't you mean userid@hostname ?
Also, in any Bourne-like shell, when you assign a variable, you
shouldn't have spaces before or after the = sign.
How about:
scp userid@hostname:*.zip .
echo $?
or:
rsync -au user@hostname:*.zip .
echo $?
-- Commander Spiral Pyjama Pseudo-Rhinocerous Feline Thingamajig Bill Marcum (the First) Ozy and Millie Name Generator http://heifong.phase.org/omname.php
- Next message: Mark Blain: "Re: Where can I get the source code for the Bourne Shell?"
- Previous message: Alan Connor: "Re: how to test for return code?"
- In reply to: Jane: "how to test for return code?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|