On Wednesday 19 Jan 2011 13:37:30 Greg Wooledge wrote: > On Wed, Jan 19, 2011 at 10:49:47AM +0000, Davide Brini wrote: > > In your second script, the "exit 0" part runs in a subshell, so "exit" > > exits that subshell (and I'm somewhat surprised that no semicolon is > > required after the closing bracket, but I may have missed something in > > the grammar). > > He had parentheses (like this) not brackets.
I thought those were also a type of brackets (round brackets). From wikipedia: "Parentheses (singular, parenthesis) – also called simply brackets (UK), or round brackets, curved brackets, oval brackets, or, colloquially, parens..." http://en.wikipedia.org/wiki/Bracket#Parentheses_.28_.29 > You don't need semicolons to terminate commands inside parentheses. I was not wondering about what's inside the parentheses, but rather why this works if (somecommand) then ... while I would expect it should be if (somecommand); then ... or, alternatively, if (somecommand) then ... But as I said, I haven't checked the grammar. -- D.