Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法将所有输出导出set -x到文件?我的练习是使用set -x一些功能,例如mkdir并将touch 所有输出导出到文件中。
set -x
mkdir
touch
谢谢
$ (set -x; echo hello) &> foo.txt $ cat foo.txt + echo hello hello
例子