Op 25-09-16 om 22:52 schreef Thorsten Glaser: > Per XSI, -o is a binary primary: [...] > Well, $1 is '!' and therefore true. Same for $3, which is > 'noclobber' and therefore true. That means that the result > of -o is also true.
Makes complete sense and I should have figured this out myself. Sorry for the noise and thanks for the references. I guess this explains why the POSIX spec does not include 'test -o' (or 'test -a' as a synonym for 'test -e'). Not including them avoids this logical but unintuitive behaviour. - M.