t=`date '+%Y%m%d'`
python -m utils.tests.ppt_export_test 2>&1|tee -a log/ppt_export_test-${t}.log
其中 -m是一脚本的形式去运行,
2>&1意思是2为标准错误,&1为标准输出,意思是将标准错误输出到标准输出中去。如果没有2>&1,只会有标准输出,没有错误
tee -a 表示同时输出到控制台和文件,tee -a 以追加的形式写入file
t=`date '+%Y%m%d'`
python -m utils.tests.ppt_export_test 2>&1|tee -a log/ppt_export_test-${t}.log
其中 -m是一脚本的形式去运行,
2>&1意思是2为标准错误,&1为标准输出,意思是将标准错误输出到标准输出中去。如果没有2>&1,只会有标准输出,没有错误
tee -a 表示同时输出到控制台和文件,tee -a 以追加的形式写入file