Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- check_pipe() {
- local -a status=("${PIPESTATUS[@]}")
- local limit=$1
- local ix
- if [ -z "$limit" ] ; then
- limit="${#status[@]}"
- fi
- for ((ix=0; ix != $limit ; ix++)); do
- if [ "${status[$ix]}" != "0" ] ; then
- error_handler
- fi
- done
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement