| ... | ... |
@@ -598,7 +598,15 @@ if [[ -n "$LOGFILE" ]]; then |
| 598 | 598 |
exec 3>&1 |
| 599 | 599 |
if [[ "$VERBOSE" == "True" ]]; then |
| 600 | 600 |
# Redirect stdout/stderr to tee to write the log file |
| 601 |
- exec 1> >( tee "${LOGFILE}" ) 2>&1
|
|
| 601 |
+ exec 1> >( awk ' |
|
| 602 |
+ {
|
|
| 603 |
+ cmd ="date +\"%Y-%m-%d %H:%M:%S \"" |
|
| 604 |
+ cmd | getline now |
|
| 605 |
+ close("date +\"%Y-%m-%d %H:%M:%S \"")
|
|
| 606 |
+ sub(/^/, now) |
|
| 607 |
|
|
| 608 |
+ fflush() |
|
| 609 |
+ }' | tee "${LOGFILE}" ) 2>&1
|
|
| 602 | 610 |
# Set up a second fd for output |
| 603 | 611 |
exec 6> >( tee "${SUMFILE}" )
|
| 604 | 612 |
else |