Re:Benchmarking shell pipelines and the Unix “tools” philosophy
by boyter on Wednesday January 08, 2020 @12:55AM
(#21988734)
Can anyone comment why you can only use the verbose flag if you use the full path of time?
does not work but
does? I don't have enough knowledge of either linux applications or bash to know whats happening to cause this.
[ Parent
| on HN ]
Re:Benchmarking shell pipelines and the Unix “tools” philosophy
by dtwwtd on Wednesday January 08, 2020 @01:03AM
(#21988768)
This is very likely because without the full path your shell is using the `time` builtin function of your shell as opposed to using the binary.
The shell's builtin keyword for `time` is more limited in nature than the full `time` binary. This is true of a number of other common unix commands as well, e.g. `echo`. The manpage for your shell should describe the builtins functions.
Re:Benchmarking shell pipelines and the Unix “tools” philosophy
by eesmith on Wednesday January 08, 2020 @01:01AM
(#21988762)
Your shell has a built-in "time" command.
man bash:
If the time reserved word precedes a pipeline, the elapsed as well
as user and system time consumed by its execution are reported when
the pipeline terminates.
man time: Some shells may provide a builtin time command which is similar
or identical to this utility. Consult the builtin(1) manual page.
Re:Benchmarking shell pipelines and the Unix “tools” philosophy
by inimino on Wednesday January 08, 2020 @02:05AM
(#21989034)
You can also type `type time` to see that time is a builtin. `which` and `hash` may also be interesting.