shell in qnx not compatible

Hello,

/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?
#!/bin/sh
if ((test -r /usr/local/aa) && (test ! -h /usr/local/aa))
then
echo good
fi

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 qnx.com/developers/docs/mome … 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:

[code]#!/bin/sh

let i=0

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

echo $i

let i=i+1
done[/code]

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’.