-
golang exec 执行系统命令exec.Command()
最简单的方法:
cmd := exec.Command( "/bin/sh/" , "-c" , "linux命令" ) 或复杂的, 各个参数都要单独写
cmd := exec.Command( "ls", "-l", "-a" )
package main import ( "bytes" "fmt" "os/exec" ) func main() { in := bytes.NewBuffer(nil) cmd := exe? golang ? 16807 0 0