>> But the line >> extglob="$(shopt -p extglob)" ) >> returns 1. >> >> Why ?
>$ help shopt >... > Exit Status: > Returns success if OPTNAME is enabled; fails if an invalid option is > given or OPTNAME is disabled. So, really, all that's needed is: shopt -q extglob || extoff=Y shopt -s extglob # Do stuff here [ "$extoff" ] && shopt -u extglob ================================================================================= Please do not send me replies to my posts on the list. I always read the replies via the web archive, so CC'ing to me is unnecessary. When responding to my posts, please try to refrain from giving bureaucratic answers. If you have nothing useful to say, then just click Next and go on.
