On Wed, 17 Dec 2008, Chet Ramey wrote:
> Bash-3.2 doesn't treat process substitution specially during brace expansion.
> It's subject to the same brace expansion as any other word.
>
> The next release of bash will pass the contents of process substitution
> through brace expansion unchanged.
>
Attached patch seems to fix the problem for me. Please include in the next
release after review.
Thanks,
Rajeev
diff -urN bash-3.2.orig/braces.c bash-3.2/braces.c
--- bash-3.2.orig/braces.c 2006-09-09 08:27:17.000000000 +0530
+++ bash-3.2/braces.c 2008-12-18 00:12:05.535787394 +0530
@@ -496,6 +496,15 @@
i++;
continue;
}
+ if ((c == '<' || c == '>') && text[i+1] == '(')
+ {
+ si = i + 2;
+ t = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si);
+ i = si;
+ free(t);
+ i++;
+ continue;
+ }
#endif
if (c == satisfy && level == 0 && quoted == 0 && commas > 0)