// ps aux | grep "signal" | grep -v "grep" | grep -v "go run" | awk '{print $2}'
cmds := []*exec.Cmd{ // 这里为什么用指针呢???
exec.Command("ps", "aux"),
exec.Command("grep", "signal"),
exec.Command("grep", "-v", "grep"),
exec.Command("grep", "-v", "go run"),
exec.Command("awk", "{print $2}"),
}
更多评论