From 669921864f7a7d59ed73bb49f6e10c0d0532765b Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Thu, 26 Jul 2018 11:07:56 -0700 Subject: [PATCH] Updated SC2176 (markdown) --- SC2176.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SC2176.md b/SC2176.md index fc48052..7e531a2 100644 --- a/SC2176.md +++ b/SC2176.md @@ -3,7 +3,8 @@ ### Problematic code: ```sh -time foo | bar``` +time foo | bar +``` ### Correct code: @@ -19,7 +20,7 @@ To time everything in a pipeline: time bash -c 'foo | bar' ``` -Note that you can not `time sh -c` to time an entire pipeline, because POSIX does not guarantee that anything other than the last stage is waited on and therefore be recursively counted in the `times()` call that `time` depends on. +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. ### Rationale: @@ -27,4 +28,4 @@ This behavior is explicitly left undefined [in POSIX](http://pubs.opengroup.org/ ### Exceptions: -None. This method is not given in `ksh` or `bash` where `time` is defined for pipelines. \ No newline at end of file +None. This warning is not emitted in `ksh` or `bash` where `time` is defined for pipelines. \ No newline at end of file