gf/geg/os/gproc/gproc_shellexec.go
2019-04-03 00:03:46 +08:00

14 lines
206 B
Go

package main
import (
"fmt"
"github.com/gogf/gf/g/os/gproc"
)
// 执行shell指令
func main() {
r, err := gproc.ShellExec(`sleep 3s; echo "hello gf!";`)
fmt.Println("result:", r)
fmt.Println(err)
}