[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#267142: debian-policy: Sections 10.4 and 6.1 are inconsistent (Posix doesn't say what you think it says)



Thomas Bushnell writes:
> I find the shell syntax very broken, because it's weirdly right
> associative, so I find using shell && and || freaky.  And then using
> parens is nasty, because they create subshells and slow things down.


My understanding is that you can use braces to enforce scopes without
creating subshells.  Thus if you are worried about how the following
will behave:

   x && y || z

then you can do one of the following instead:

  { x && y ; } || z          x && { y || z ; }

-- 
Thomas Hood



Reply to: