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
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.
[ Parent
| on HN ]
There are no comments on this comment yet.