# following command combines the output of the parenthesized commands (minus the <apostrophe> characters) onto one line, which is then appended to the file log. It assumes that the expansion of "$0 $*" does not include any <apostrophe> or <newline> characters.

(logname; date; printf "'%s'\n" "$0 $*") | xargs -E "" >>log
