wayne
November 23, 2004, 7:56am
1
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
mezek
November 23, 2004, 8:34am
2
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
mezek
November 23, 2004, 8:51am
3
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 ?
wayne
November 24, 2004, 7:47am
4
thanks so much for your help. bash is default in linux only not unix.
and sorry but…how can (if I can) start a for from sh?
in bash it have the same syntax of c++…
mezek
May 20, 2005, 12:33pm
6
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”)
mezek
May 20, 2005, 2:21pm
8
yes there is, however qnx do not have manual page for “ksh”, only helpwiever or on-line docs
If you want help, try command ‘use’.