1 Star 1 Fork 1

xiaoyutab / xgotool

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
exec.go 418 Bytes
一键复制 编辑 原始数据 按行查看 历史
xiaoyutab 提交于 2024-01-19 12:46 . 代码优化
package xgotool
import (
"gitee.com/xiaoyutab/xgotool/optional/xcmd"
)
// Exec 执行Shell命令并等待结果输出【避免僵尸进程】
//
// 如果要使用管道进行输出,则需要使用bash进行嵌套,如:
//
// xgotool.Exec("bash", "-c", "ps aux | grep go")
//
// name 命令参数
// arg... 参数列表
func Exec(name string, arg ...string) (string, error) {
return xcmd.Exec(name, arg...)
}
Go
1
https://gitee.com/xiaoyutab/xgotool.git
git@gitee.com:xiaoyutab/xgotool.git
xiaoyutab
xgotool
xgotool
v0.3.13

搜索帮助