根据runbashcommandinnewshellandstayinnewshellafterthiscommandexecutes,如何运行命令:bash--rcfile'&&ls")在golang中?我已经尝试了很多exec.Command()的组合,但它们都不起作用。例如:exec.Command("bash","--rcfile",`我也读过这个os,os/exec:usingredirectionsymbol''failed,但我想我的情况可能有点复杂。 最佳答案 您快完成了-我认为混淆是您使用管道调用bash,这意味着