Re: [go-nuts] run cmd and capture output on remote machine

2018-09-26 Thread Hemant Singh
I was using ssh with the exec package. However, I didn't know how to capture the output of the cmd run. Today, I studied the exec package and found the Output functionality. Now I can capture the output. https://golang.org/pkg/os/exec/?m=all#Cmd.Output Best, Hemant On Tuesday, September

Re: [go-nuts] run cmd and capture output on remote machine

2018-09-25 Thread robert engels
You can do this via ssh. > On Sep 25, 2018, at 7:01 PM, Hemant Singh wrote: > > I have been able to run a command on a remote machine using Go. Is there a > working example that shows how to capture the output of the command back to > the client machine? Maybe an interactive shell... > >

[go-nuts] run cmd and capture output on remote machine

2018-09-25 Thread Hemant Singh
I have been able to run a command on a remote machine using Go. Is there a working example that shows how to capture the output of the command back to the client machine? Maybe an interactive shell... My other choice is to run the command and save its output to a file and copy the file fro