On Mon, Jul 18, 2016 at 7:43 PM, Brandon Whaley <[email protected]> wrote:

> There are two approaches here.  The first is to open a file and write the
> result of the 'w' command from within checkconn, the other is to redirect
> from the shell.
>
> $ fab checkconn > checkconn_result.log
>
> OR
>
> def checkconn():
>     result = run('w')
>     with open('checkconn_result.log', 'w') as f:
>         f.write(result)
>
>
Thank you Brandon for the suggestion.

Regards,

Kaushal
_______________________________________________
Fab-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/fab-user

Reply via email to