News for hackers. Stuff that matters.
Re:/usr/bin/time: not the command you think you know by Merovius on Tuesday March 07, 2017 @11:18AM (#13811569)
No, it wouldn't require special-case syntax. It could just pass it's argument to '/bin/sh -c'. You'd have to shell-escape the pipeline, though.
Re:/usr/bin/time: not the command you think you know by eridius on Tuesday March 07, 2017 @04:50PM (#13815325)
Yeah it does require special-case syntax. When using bash's built-in time, the command is executed exactly the same way as if you weren't using time, which means the command can set variables or define functions in the current shell. For example, you can say

  time foo=bar
  echo $foo
and it will correctly print out "bar". It can't do this if it executes the command in a subshell. Or similarly you can say `time cd /foo` and it will actually change the current working directory.