Re: Why are curly braces different than parens for cmd grouping?
From:
Sven Mascheck
Subject:
Re: Why are curly braces different than parens for cmd grouping?
Date:
Thu, 6 Aug 2009 01:08:59 +0200
User-agent:
Mutt/1.5.13 (2006-08-11)
Chet Ramey wrote:
> Linda Walsh wrote:
> > A previous note had me wondering why the syntax for using
> > curly braces to group expressions wasn't able to be the same as
> > using 'paren's.
>
> Braces are reserved words. Parentheses are operators. Blame
> Steve Bourne.
I wonder about the motivation, or was it just an "oversight"?
Some tried to adjust this,
- You did so in bash-1 (just found out by coincidence),
although blanks were required, "{ cmd }".
- D.Ritchie made them operators in the svr2-derived V8 shell,
where "{cmd}" works.
- and the SUS rationale to the command language explains that
this step was delayed for portability reasons but left it open,
"It is possible that a future version of the Shell [...]"
[Prev in Thread]
Current Thread
[Next in Thread]
Re: Why are curly braces different than parens for cmd grouping?,
Sven Mascheck<=