On 8/23/17 10:24 AM, Dethrophes wrote: > > >> >>> Which I always understood as the correct way of doing this in the >> first place... >> >> It's not as good as multiple test commands: test -f file && test -x >> file. >> There's no ambiguity and you get short-circuiting. > > Only if you are using the test built-in, otherwise the latter means 2 > spawns/forks however the shell in question calls the test exec.
Since bash has a test builtin, this isn't exactly on point. But you have to accept this kind of micro-inefficiency with a shell that sacrifices speed for size. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/