Shell: debug所有运行过程到log文件, Run a bash script in debug mode, show output and save it on a file

直接代码:

bash -x test.sh 2>&1 | tee out.test

或者:

bash -x script.sh 2> log

-x表示debug模式

Shell: debug所有运行过程到log文件, Run a bash script in debug mode, show output and save it on a file
Shell: debug所有运行过程到log文件, Run a bash script in debug mode, show output and save it on a file
Shell: debug所有运行过程到log文件, Run a bash script in debug mode, show output and save it on a file
Shell: debug所有运行过程到log文件, Run a bash script in debug mode, show output and save it on a file
Shell: debug所有运行过程到log文件, Run a bash script in debug mode, show output and save it on a file
Shell: debug所有运行过程到log文件, Run a bash script in debug mode, show output and save it on a file

 

本文:Shell: debug所有运行过程到log文件, Run a bash script in debug mode, show output and save it on a file

Leave a Reply