printf "%s\n%s\n\n" "Log of $prettycommand" "$(date)" >"$file"
if [[ $- != *x* ]]; then
- echo "log $file = $@"
+ echo "log $file = $*"
fi
# we will propagate any errors
- local logq_ret=$(
+ local logq_ret
+ logq_ret=$(
set +e
trap ERR
"$@" &>> "$file"