Answers for "golang bash command"

Go
0

golang execute bash command

cmd := exec.Command("echo", "hello wordl")
res, _ := cmd.CombinedOutput()
fmt.Println(string(res))
Posted by: Guest on October-10-2021
0

golang execute bash command

cmd := exec.Command("go", "-v")
res, _ := cmd.Output()
fmt.Print(string(res))
Posted by: Guest on April-07-2022

Browse Popular Code Answers by Language