Bash treats the built-in
time as a special case, when parsing command-lines.
As can be read in the bash manpage, the line as typed is first split into a list:
pipeline ; pipeline
where a pipeline is:
[time [-p]] [ ! ] command [ [|⎪|&] command2 ... ]
or in our case, simply:
i.e. if time is present, then command must also be present.
[There is a special case that allows
time to be followed by a newline, but that doesn't apply here]
So, in our case, we have:
being split into two pipelines:
and pipeline 1 is not well formed, since we have
time without a command. Hence the error.
Note that the command-line
time doesn't work here either:
Usage: /usr/bin/time [-apvV] [-f format] [-o file] [--append] [--verbose]
bash parses this as expected, into 2 pipelines:
/usr/bin/time then refuses to run with no argument. Note that this is an error from
/usr/bin/time not an error from bash.
The reason that back-tick works is that the back-tick stops
time being interpreted as a special element within the pipeline.
i.e. with the back-tick:
it is parsed as two pipelines:
Remember that a pipeline, in our case, is:
and the problem initially was that we had
time with no command, which isn't allowed. But now we simply have the command:
without the preceding
time, since the back-ticks mean that
time is interpreted as the command, not as a preceding word.
So bash then runs its builtin
time with no args, which is accepted. It produces no output, and we see no error.
actually runs the result of the
time built-in, i.e. it runs whatever the
time built-in produces on stdout. But since
time on its own doesn't write anything to stdout, it appears to work.
Finally, it's been noted that this works:
time ; ; date
which I can't explain, sadly :)