[BangPypers] Redirection of standard output to a variable

Anand Chitipothu anandology at gmail.com
Tue May 13 11:53:35 CEST 2008


On Tue, May 13, 2008 at 3:18 PM, KartheeK <kartheekpn at yahoo.co.in> wrote:
> Hi Rishabh,
>
> My script needs to fetch some critical config files from 200+ servers,
> process them and put them back in place. I need to make sure at each step
> that I am doing the right thing.
> So, I though i would make sure to see "100%"  each time I download a config
> file and then only proceed further to process it.

Then you should look at the exit status of scp command. Any non-zero
exit status is failure.
In python, os.system function executes a command and returns its exit status.


More information about the BangPypers mailing list