2016-03-09 08:04:33 -0500, Chet Ramey:
> On 3/8/16 6:04 AM, Isabella Parakiss wrote:
> 
> > 
> > This seems to be a related problem:
> > $ time (exec true)              # doesn't print anything
> 
> Timing is an attribute associated with a command.  In this case, that's the
> simple command (`exec true') that is run in a subshell.  When that command
> is executed, the shell that is started to run the subshell and print the
> timing statistics is overwritten by the `exec true'.
[...]

Or in other words, 

time (cmd) [redirections]

is actually interpreted as if you had entered:

(time { cmd; }) [redirections]

As you've confirmed it was the intended behaviour (and anyway
some people rely on it), it would be worth documenting IMO.

-- 
Stephane

Reply via email to