[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "bashbug" script
From: |
Jan Schampera |
Subject: |
Re: "bashbug" script |
Date: |
Sat, 4 Aug 2007 12:06:46 +0200 |
On Thu, 2 Aug 2007 09:29:19 -0400
Chet Ramey <chet.ramey@case.edu> wrote:
> > Here was an interesting bug which was some what unexpected.
> >
> > cat <(find ./ -iname t{1,2,3})
> >
> > this is a valid command according to bash due to a bugged expansion
> > of {1,2,3} and the process expansion. It becomes three commands:
> >
> > find ./ -iname t1
> > find ./ -iname t2
> > find ./ -iname t3
>
> It's not a bug. Brace expansion is the first word expansion
> performed, and can potentially expand one word to multiple ones. If
> you want to defer the brace expansion until the command in the
> process substitution is executed, add a backslash before the open
> brace.
>
> Chet
>
Hi Chet,
I intentionally expected <() and >() to be as protected as $() is. Is
there a specific reason for them to not be protected against the
initial parsing? Compatiblity to some other shell maybe?
Or do I get that all wrong?
J.