Return status of command substitution with $(...) "gets lost"

2010-03-04 Thread Ettelbrueck, Heiko
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/l

reversal of brace vs process expansion needs compatibility option

2010-03-04 Thread Ted Bagg
Dear Bash maintainers, this very useful construct worked in 3.2: diff <(sort {a,b}.lst) but fails in 4.0, breaking scripts for many, no doubt. Such a substantive change (much more harm than good, in my opinion) ought always to come with an option to revert to the previous behavior. Sincere

Re: Return status of command substitution with $(...) "gets lost"

2010-03-04 Thread Chris F.A. Johnson
On Thu, 4 Mar 2010, Ettelbrueck, Heiko wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-g

Re: Return status of command substitution with $(...) "gets lost"

2010-03-04 Thread Chet Ramey
On 3/4/10 2:36 AM, Ettelbrueck, Heiko wrote: > Important detail: The local variable is declared and defined in > the same step with "local VARNAME=$(do something)". > > Problem: The $? variable is always 0 after that statement. (If, > on the other hand, I separate

Re: reversal of brace vs process expansion needs compatibility option

2010-03-04 Thread Chet Ramey
On 3/4/10 3:43 AM, Ted Bagg wrote: > Dear Bash maintainers, this very useful construct worked in 3.2: > > diff <(sort {a,b}.lst) > > but fails in 4.0, breaking scripts for many, no doubt. Such a > substantive change (much more harm than good, in my opinion) ought > always to come with an option