This simple command works correctly when submitted via the terminal, but the same command submitted to os.exec does not !! .. and I can`t understand why...
import ( "fmt"; "os"; "os/exec"; ) func main() { cb := "ABCD" cmd := exec.Command ("echo", "echo "+ "'" +string(cb [0:len(cb)-1] ) +"'", " |xsel --clipboard" ) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err := cmd.Run() ; if err != nil { fmt.Printf("\ncmd.Run() error: %s \n", err) } } -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/f9b34d9d-985f-4cbf-9a92-d3d46d72cf55%40googlegroups.com.