bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

errexit lost in command substitution


From: Stephane Chazelas
Subject: errexit lost in command substitution
Date: Tue, 11 Jan 2005 12:31:51 +0000
User-agent: Mutt/1.5.6i

bash-3.00$ set -e
bash-3.00$ echo $-
ehimBH
bash-3.00$ echo $(echo $-)
himBH

(same for set +o)

Bug or feature?

The problem is in:

old_options=$(set +o)
# change options
eval "$old_options" # restore options

(bash 3.0.16)

regards,
Stéphane





reply via email to

[Prev in Thread] Current Thread [Next in Thread]