0
次作品が含まれており、コマンドの出力を印刷し、実行コマンド:ゴーexec.Command() - パイプ
out, err := exec.Command("ps", "cax").Output()
が、この1つは(終了ステータス1で)失敗します。
out, err := exec.Command("ps", "cax | grep myapp").Output()
どれでも提案?すべてを渡す
out, err := exec.Command("bash", "-c", "ps cax | grep myapp").Output()