6 # Tests for installed() with hopefully proper exit codes (1 if the program was
8 installed ls && echo ls installed
9 installed doesnt-exist && echo doesnt-exist installed
10 # Simulate BSD `which` like on Mac OS X which doesn't use exit codes.
12 echo Mac OS X which for $1 >&2
16 echo no doesnt-exist in /usr/bin /bin /usr/sbin /sbin
19 # Tests for installed() without exit codes.
20 installed ls && echo ls installed
21 installed doesnt-exist && echo doesnt-exist installed