例如:
#!/bin/bash
#LOG="examples/mnist/lenet_log_mylog"
LOG="LOG/log.txt.`date +'%Y-%m-%d_%H-%M-%S'`"#包含运行日期exec &> >(tee -a "$LOG")echo Logging output to "$LOG"
./build/tools/caffe train --solver=examples/mnist/lenet_solver.prototxt