[go-nuts] Re: Simple exec.Command() program

2017-11-13 Thread bucarr
> > You guys are great. Not only did you explain at length, what I was > misunderstanding, but you offered several solutions. > Thanks to one and all! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] Re: Simple exec.Command() program

2017-11-12 Thread Nilsocket
package main import ( "os" "os/exec" ) func main() { cmd := exec.Command("ls") null, _ := os.Open(os.DevNull) defer null.Close() cmd.Stdout = null cmd.Run() } What you were trying to do is, redirecting output of ls to /dev/null. `ls` is the name of the command. `>` is