Tim Connors <[email protected]>
writes:

> http://mywiki.wooledge.org/BashFAQ/105
>
> (subshells in bash don't always inherit "set -e" from the parent.

This WFM, YMMV, #bash doesn't like it.

    #!/bin/bash
    ## Program description goes here
    # Boilerplate prelude ################################################
    set -eEu
    set -o pipefail
    trap 'echo >&2 "$0: unknown error"' ERR
    while getopts d opt
    do case "$opt" in (x) set -x;; ('?') exit 1;; esac
    done
    shift $((${OPTIND:-1}-1))
    # Begin code #########################################################

_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main

Reply via email to