[Bug 224270] Get exit status of process that's piped to another: set -o pipefail is missing for /bin/sh

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Dec 14 09:08:37 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224270

--- Comment #4 from Wolfram Schneider <wosch at FreeBSD.org> ---
(In reply to Jilles Tjoelker from comment #2)

You mean a pipe like this:

( set -o pipefail; man tcsh | head | wc -l ); echo $?
    10
141

You can use a sub shell if you need the pipefail option for a special action
only.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list