shell.go
package main
import (
"os/exec"
)
func exec_shell(s string) {
exec.Command("/bin/bash", "-c", s).Run()
}
func main() {
exec_shell("mkdir test")
}
go fmt shell.go
go build shell.go
./shell
shell.go
package main
import (
"os/exec"
)
func exec_shell(s string) {
exec.Command("/bin/bash", "-c", s).Run()
}
func main() {
exec_shell("mkdir test")
}
go fmt shell.go
go build shell.go
./shell