PHP
·
发表于 5年以前
·
阅读量:8283
package main
import (
"fmt"
"os/exec"
)
func main(){
cmd := exec.Command("touch", "test_file")
err := cmd.Run()
if err != nil {
fmt.Println("Execute Command failed:" + err.Error())
return
}
fmt.Println("Execute Command finished.")
}