shell 脚本如下:

logFile=/usr/local/log/$today.txt 

exec >> $logFile 2>&1 

 1为标准输出stdout、2为标准错误stderr。 

 

相关文章: