exec.Command执行出错: exit status 64

执行下面的代码, 报"exit status 64" ```go result , err := exec.Command("ping","-n 1", "-w 1", "223.6.6.6").Output() if err != nil { fmt.Println(err) } fmt.Printf("%s\n", result) ```
已邀请:

leiyonglin

赞同来自: leoliu astaxie

exec.Command("sh", "-c", "ping -n 1 -w 1 223.6.6.6")

limard

赞同来自: leoliu

exec.Command("ping", "-n", "1", "-w", "1", "223.6.6.6").Output()

要回复问题请先登录注册