-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2176
Joachim Ansorg edited this page Nov 12, 2021
·
3 revisions
time foo | bar
To time the most relevant stage:
foo | { time bar; }
To time everything in a pipeline:
time bash -c 'foo | bar'
Note that you can not use time sh -c
to time an entire pipeline, because POSIX does not guarantee that anything other than the last stage is waited upon by the shell.
This behavior is explicitly left undefined in POSIX.
None. This warning is not emitted in ksh
or bash
where time
is defined for pipelines.