shell in qnx not compatible


/bin/sh in qnx 6.2.1 is different from default bash shell in other unix.

how can I get the following code in qnx?
if ((test -r /usr/local/aa) && (test ! -h /usr/local/aa))
echo good

I got the error message syntax error: ‘if’ unmatched. Also, I don’t know where " man" can be found in qnx.

thank you

Primary documentation in qnx are not in manual pages but is available through helpviewer photon application
and also could be found here … index.html

if test -r /usr/local/aa && test ! -h /usr/local/aa

this works in both bash and ksh

PS: bash is default shell in unix ? :slight_smile:

thanks so much for your help. bash is default in linux only not unix. :slight_smile:

and sorry but…how can (if I can) start a for from sh?
in bash it have the same syntax of c++…

there are several options:


let i=0

while ["$i" -ne “10”]

echo $i

let i=i+1

btw. there is a man in QNX 6.2.1, it can be installed from the third party repository (“gnu man”)

yes there is, however qnx do not have manual page for “ksh”, only helpwiever or on-line docs :slight_smile:

If you want help, try command ‘use’.