我试图了解下面的 shell 脚本在做什么。我知道没有任何参数的 exec 会重定向当前 shell 的输出,但无法理解以下命令的作用:
exec 1>/var/opt/log/my_logs/MYPROG_`date '+%Y%m%d_%H%M%S'`.log 2>&1
command-line bash scripts execute-command
bash ×1
command-line ×1
execute-command ×1
scripts ×1