On 16Sep2010 17:21, Moritz Barsnick <barsn...@gmx.net> wrote: | Creative nit-pick mood. :-) | | > +[ -d .hg ] || { cat VERSION; exit 0; } | > +hg >/dev/null 2>&1 || { cat VERSION; exit 0; } | | { [ -d .hg ] && hg >/dev/null 2>&1 } || { cat VERSION; exit 0; }
semicolon needed: ------------------^ I suspect precedence would let you skip the {} around the &&, too, but I've never liked relying on it. I _would_ change the: cat VERSION; exit 0 into: exec cat VERSION That has two advantages: - tiny performance optimisation - much more important, if VERSION is missing (== cat fails) the script should _not_ exit 0 !! Cheers, -- Cameron Simpson <c...@zip.com.au> DoD#743 http://www.cskk.ezoshosting.com/cs/ "Vy can't ve chust climb?" - John Salathe