[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Consequences of shell errors
From: |
isabella parakiss |
Subject: |
Re: Consequences of shell errors |
Date: |
Thu, 18 Jun 2015 11:08:55 +0200 |
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
Re: Consequences of shell errors, Eric Blake, 2015/06/18