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.
我有一个调用多个命令的 bash 脚本。我已使用重定向所有错误输出
exec 2> logfile
虽然这可行,但最好获取生成错误输入到日志文件的命令。有人有建议吗?
这对你有用吗?:
BASH_XTRACEFD="2" set -x