We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To ensure any failures bubble up to the top-level script.
Also, for process substitutions:
cat <(echo "hello"; false; echo "nothing") <(echo "goodbye"; false; echo "really")
will need to be rewritten to something like:
pushd $(mktemp -d) > /dev/null mkfifo f1 (set -eu; set -o pipefail; echo "hello"; $comm; echo "nothing") > f1 2>&1 & echo $! >> pids mkfifo f2 (set -eu; set -o pipefail; echo "goodbye"; $comm; echo "really") > f2 2>&1 & echo $! >> pids cat f1 f2 for pid in $(<pids) do wait $pid || echo $pid >> failed done if [ -e failed ] then echo "command failed" rm -rf $PWD popd > /dev/null false else rm -rf $PWD popd > /dev/null fi
which gives:
$ pushd $(mktemp -d) >/dev/null $ mkfifo f1 $ ( set -eu set -o pipefail echo "hello" false echo "nothing" ) >f1 2>&1 & $ echo $! >>pids $ mkfifo f2 $ ( set -eu set -o pipefail echo "goodbye" false echo "really" ) >f2 2>&1 & $ echo $! >>pids $ cat f1 f2 hello goodbye $ for pid in $(<pids); do wait $pid || echo $pid >>failed done $ if [ -e failed ]; then echo "command failed" rm -rf $PWD popd >/dev/null false else rm -rf $PWD popd >/dev/null fi command failed
The text was updated successfully, but these errors were encountered:
No branches or pull requests
To ensure any failures bubble up to the top-level script.
Also, for process substitutions:
will need to be rewritten to something like:
which gives:
The text was updated successfully, but these errors were encountered: