Re: strange expansion of <(cat p.main.{optional,extra})

2007-04-18 Thread Andreas Schwab
Chet Ramey <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > >> Bash Version: 3.1 >> Patch Level: 17 >> Release Status: release >> >> Description: >> Hi, >> >> The expansion of echo <(cat /etc/{passwd,motd}) is rather surprising: >> $ echo <(cat p.main.{optional,extra}) >> ++ cat p.main.

Re: strange expansion of <(cat p.main.{optional,extra})

2007-04-18 Thread Lucas Nussbaum
On 18/04/07 at 11:11 +0200, Andreas Schwab wrote: > Chet Ramey <[EMAIL PROTECTED]> writes: > > > [EMAIL PROTECTED] wrote: > > > >> Bash Version: 3.1 > >> Patch Level: 17 > >> Release Status: release > >> > >> Description: > >> Hi, > >> > >> The expansion of echo <(cat /etc/{passwd,motd}) is rath

Re: strange expansion of <(cat p.main.{optional,extra})

2007-04-18 Thread Andreas Schwab
Lucas Nussbaum <[EMAIL PROTECTED]> writes: > Well, no, because bash expands *parameters*, not words. So the prefix is > "<(cat /etc/", and the suffix is ")". But that would not be a *strict textual* expansion. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, M

Re: strange expansion of <(cat p.main.{optional,extra})

2007-04-18 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Andreas Schwab on 4/18/2007 4:01 AM: > Lucas Nussbaum <[EMAIL PROTECTED]> writes: > >> Well, no, because bash expands *parameters*, not words. So the prefix is >> "<(cat /etc/", and the suffix is ")". > > But that would not be a *strict

Re: strange expansion of <(cat p.main.{optional,extra})

2007-04-18 Thread Andreas Schwab
Eric Blake <[EMAIL PROTECTED]> writes: > According to Andreas Schwab on 4/18/2007 4:01 AM: >> Lucas Nussbaum <[EMAIL PROTECTED]> writes: >> >>> Well, no, because bash expands *parameters*, not words. So the prefix is >>> "<(cat /etc/", and the suffix is ")". >> >> But that would not be a *strict

Re: strange expansion of <(cat p.main.{optional,extra})

2007-04-18 Thread Stephane Chazelas
On Tue, Apr 17, 2007 at 08:16:53PM -0400, Chet Ramey wrote: [...] > > The expansion of echo <(cat /etc/{passwd,motd}) is rather surprising: > > $ echo <(cat p.main.{optional,extra}) > > ++ cat p.main.optional > > cat: p.main.optional: No such file or directory > > ++ cat p.main.extra > > cat: p.ma

Re: strange expansion of <(cat p.main.{optional,extra})

2007-04-18 Thread Lucas Nussbaum
On 18/04/07 at 14:37 +0200, Andreas Schwab wrote: > Eric Blake <[EMAIL PROTECTED]> writes: > > > According to Andreas Schwab on 4/18/2007 4:01 AM: > >> Lucas Nussbaum <[EMAIL PROTECTED]> writes: > >> > >>> Well, no, because bash expands *parameters*, not words. So the prefix is > >>> "<(cat /etc/

Re: strange expansion of <(cat p.main.{optional,extra})

2007-04-18 Thread Chet Ramey
Stephane Chazelas wrote: > On Tue, Apr 17, 2007 at 08:16:53PM -0400, Chet Ramey wrote: > How does it get exanded to > > echo <(cat p.main.optional) <(cat p.main,extra) > > though? > > If it were textual, I would expect: > > echo <(cat p.main.optional) p.main,extra) It's still a word expansion