On 6/18/15, Nick Stoughton <nstoughton@aether.com> wrote:
>
> set -e
> export X=$(false)
> # should not reach here
> echo did not exit
>
> But every shell I tested behaves the same way (sh, bash, dash, ksh, mksh,
> yash and zsh), so I feel I must be missing something. Can someone explain
> why the first 2 examples do not exit on the error in the expansion?
>
The exit code of export X=$(false) is export's.
---
xoxo iza