我正在尝试使用 exec 获得等效项
diff <(echo "foo") <(echo "bar")
它产生:
1c1
< foo
---
> bar
但是当我尝试:
cmd := exec.Command("diff", "<(echo foo)", "<(echo bar)")
输出是:
exit status 2
diff: <(echo foo): No such file or directory
diff: <(echo bar): No such file or directory
RISEBY
相关分类